title: Validate if user account is active in Django Rest Framework
body: <p>I'm trying to implement account activation by e-mail link. My <code>User</code> model is very simple, inherits from <code>django.contrib.auth.models.AbstractUser</code>, so it has <code>is_active</code> field by default. Upon registration, new user is created with <code>is_active=False</code> param and I want to handle case, when user tries to log in and even though credentials are fine, should not be logged in because account is not activated. I'm using Knox Token Authentication. My serializer:</p>
  
  <pre><code>from django.contrib.auth import authenticate
  from rest_framework import serializers, exceptions
  
  
  class LoginUserSerializer(serializers.ModelSerializer):
      class Meta:
          model = UserModel
          fields = ('username', 'password')
  
      def validate(self, data):
          user = authenticate(**data)
          if user:
              if user.is_active:
                  return user
              raise exceptions.AuthenticationFailed('Account is not activated')
          raise exceptions.AuthenticationFailed()
  </code></pre>
  
  <p>And view:</p>
  
  <pre><code>from django.contrib.auth import login
  from rest_framework.permissions import AllowAny
  from rest_framework.authtoken.serializers import AuthTokenSerializer
  from knox.views import LoginView
  from .serializers import LoginUserSerializer
  
  
  class LoginUserView(LoginView):
      serializer_class = LoginUserSerializer
      permission_classes = [AllowAny]
  
      def post(self, request, *args, **kwargs):
          serializer = AuthTokenSerializer(data=request.data)
          serializer.is_valid(raise_exception=True)
          user = serializer.validated_data['user']
          login(request, user)
          return super(LoginUserView, self).post(request)
  </code></pre>
  
  <p>And with that code, I stumbled upon problem: when I try to log in with already activated account, everything looks fine, but when I try unactivated one, instead of <code>Account is not activated</code>, I get:</p>
  
  <pre><code>{
      "non_field_errors": [
          "Unable to log in with provided credentials."
      ]
  }
  </code></pre>
  
  <p>Which I think, comes rather from view than the serializer.</p>