title: Unable to login when using Django rest framework JWT
body: <p>I am trying to login to my custom LoginView using curl request but I a getting the following error:</p>
  
  <pre><code>{"detail":"Authentication credentials were not provided."}.
  </code></pre>
  
  <p>But the default login API(api-token-auth) is working fine.</p>
  
  <p>LoginView:</p>
  
  <pre><code>class LoginView(views.APIView):
      def post(self, request, format=None):
          data = json.loads(request.body)
  
          email = data.get('email', None)
          password = data.get('password', None)
  
          account = authenticate(email=email, password=password)
  
          if account is not None:
              if account.is_active:
                  login(request, account)
                  token = get_jwt_token(account)
                  return Response(token)
              else:
                  return Response({
                      'status': 'Unauthorized',
                      'message': 'This account has been disabled.'
                  }, status=status.HTTP_401_UNAUTHORIZED)
          else:
              return Response({
                  'status': 'Unauthorized',
                  'message': 'Username/password combination invalid.'
              }, status=status.HTTP_401_UNAUTHORIZED)
  </code></pre>