{% if handler.current_user %}

You are logged in

{% import json %}
handler.current_user = {{ json.dumps(handler.current_user, indent=4) }}

Click here to log out

{% else %}

You are not logged in

Click here to log in with your Google Account.

{% end %}

See the source code.