title: @login_required not doing anything
body: <p>It seems like @<code>login_required</code> decorator does nothing for me. If user is not logged in and calls registration, I expect it to redirect to login page. Am I missing anything. I even tried setting <code>@login_required(login_url='/login/')</code> but it didn't work out. </p>
  
  <p>I have made sure to set <code>LOGIN_URL</code> and
  <code>LOGIN_URL_REDIRECT</code>. All required parameters are there in <code>INSTALLED_APPS</code> and  middleware_classes. I am using latest django 1.9</p>
  
  <pre><code>def user_login(request):
      if request.method == 'POST':
          form = LoginForm(request.POST)
          username = request.POST['username']
          password = request.POST['password']
          print "u %s p:%s" % (username, password)
          user = authenticate(username=username, password=password)
          print "Authentication done"
          if user is not None:
              print "logging in"
              login(request, user)
              return HttpResponseRedirect(request.POST['next'])
          else:
              print("The username and password were incorrect.")
      else:
          form = LoginForm()
      return render(request, 'login.html', {'loginForm': form})
  
  
  @login_required
  def registration(request):
      dosomething...
  
  class LoginForm(forms.ModelForm):
      class Meta:
          model = User  
  </code></pre>