title: Overriding and customizing "django.contrib.auth.views.login"
body: <p>I'm trying to add a "keep me logged in" check box to Django's default login view.</p>
  
  <p>Here is what I'm doing:</p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>url(r'^login/$',
      myuser_login,
      {'template_name': 'app_registration/login.html', 'authentication_form': MyAuthenticationForm},
      name='auth_login',
  ),
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.contrib.auth.views import login
  
  def myuser_login(request, *args, **kwargs):
      if request.method == 'POST':
          if not request.POST.get('remember', None):
              request.session.set_expiry(0)
  
      login(request, *args, **kwargs)
  </code></pre>
  
  <p>So basically, I'm trying to add additional information to my own view and just simply call Django's default login function. When I do this, I get this error:</p>
  
  <pre><code>ValueError at /accounts/login/
  The view app_registration.views.myuser_login didn't return an HttpResponse object.
  </code></pre>
  
  <p>I checked the Django source code, and the default contrib.auth.views.login function obviously returns an HttpResponse.</p>
  
  <p>What should I do :(((?</p>
  
  <p>Thanks!!</p>