{% if form.errors %} Sorry, that's not a valid username or password {% endif %} {% csrf_token %} {% if request.GET.next %} {% endif %} {{ form.as_table }} Can't login? Checkout the ATLAS blog