title: Django login - missing 1 required positional argument
body: <p>I have simple login view:</p>
  
  <pre><code>def logowanie(request):
      if request.method == 'POST':
          user = authenticate(
              username=request.POST.get('id_username', '').strip(),
              password= request.POST.get('id_password', ''),
              )
          if user is None:
              messages.error(request, u'Invalid credentblog.ials')
          else:
              if user.is_active:
                  login(request, user)
                  return HttpResponseRedirect(request.GET.get('next', '/'))
              else:
                  messages.error(request, u'User is not active.')
  
                  return render_to_response('registration/login.html', locals(),      
                      context_instance=RequestContext(request))
  </code></pre>
  
  <p>When i try to go to login page, i get error:</p>
  
  <pre><code>TypeError: login() missing 1 required positional argument: 'user'
  </code></pre>
  
  <p>What am i doing wrong?</p>