title: django login required not happening
body: <p>I am not able to redirect the page after login. I m using django 1.7.</p>
  
  <pre><code>#settings.py
  # login URL
  LOGIN_URL = '/login/'
  
  #urls.py
  url(r'^home/order',views.buy_order,name="buy_order"),
  url(r'^login/$',views.login,name='login'),
  url(r'^login_submit/$',views.login_submit,name='login_submit'),
  
  #views.py
  @login_required(login_url='/login/')
  def buy_order_confirm(request):
      pass
  
  def login(request):
      template='login.html'
      return render(request,template)
  
  def login_submit(request):
      if request.method == "POST":
          username = request.POST['username']
          password = request.POST['password']
          user = authenticate(username=username, password=password)
          if user is not None:
              if user.is_active:
                  login_user(request, user)
                  return HttpResponseRedirect(request.POST['next']) # gives error : *** MultiValueDictKeyError: "'next'"
              else:
                  raise Http404("User is not active")
      else:
          raise Http404("Not a valid request")
      return render(request,template)
  </code></pre>
  
  <p>In <a href="https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.decorators.login_required" rel="nofollow noreferrer">doc</a>, it is given that after login page it will redirect automatically. But it is not happening for me.
  I have read <a href="https://stackoverflow.com/questions/21693342/django-after-login-required-redirect-to-next">this</a> and <a href="https://stackoverflow.com/questions/16750464/django-redirect-after-login-not-working-next-not-posting?lq=1">this</a>. They tell to send the get params in hidden field in form. I don't feel this is right. I feel there should be a clear way.</p>
  
  <p>Can anyone tell me where am I wrong?</p>