You should use the URL pattern name, not the dotted python path.
You haven't shown how you are including the login view in your URLs, so we can only guess what the correct name is, but it's probably 'login'
.
<form method="post" action="{% url 'login' %}">