{% if user %}
Logged in as {{ user.username }}.
Logout
{% else %}
Login
{% endif %}