Login

{% if user.is_authenticated %}

Logged in as {{ user.username }}

Logout {% else %}

You are not logged in.

{% endif %}
{% csrf_token %} {{ form.as_p }}