{% if user.is_authenticated %} Hi {{ user.username }}!

logout

{% else %}
{% endif %}