title: Obtain auth token using email instead of username
body: <p>I'm trying to obtain auth token using email instead of username, i have changed serialized to accept just email but i think that i have something wrong.</p>
  
  <pre><code>class AuthTokenSerializer(serializers.Serializer):
      """Serializer for user authentication object"""
  
      email_or_username = serializers.CharField()
      password = serializers.CharField(style = {'input_type' : 'password' }, trim_whitespace = False)
  
      def validate(self, attrs):
          """Validate and authentiate the user"""
  
          email_or_username = attrs.get('email')
          password = attrs.get('password')
  
          user = authenticate(request = self.context.get('request'), username = email, password = password)
  
          if not user:
              msg = _('Unable to authenticate with provided credentials.')
              raise serializers.ValidationError(msd, code='authorization')
  
          attrs['user'] = user
  
          return attrs
  </code></pre>
  
  <p>And the View </p>
  
  <pre><code>class LoginViewSet(viewsets.ViewSet):
      """Check email and password and returns an auth token."""
  
      serializer_class = serializers.AuthTokenSerializer
      renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
  
      def create(self, request):
          """Use the ObtainAuthToken APIview to validate and create a token."""
  
          return ObtainAuthToken().post(request)
  </code></pre>
  
  <p>when i make a test </p>
  
  <pre><code>def test_create_token_for_user(self):
      """Test that a token is created"""
  
      parametrs = {'email' : 'test@noah-lc.com','email' : 'test@noah-lc.com', 'name' : 'test', 'password' : 'testPASS@123'}
      create_user(**parametrs)
      res = self.client.post(TOKEN_URL, parametrs)
      print(res.data)
      self.assertIn('token', res.data)
      self.assertEqual(res.status_code, status.HTTP_200_OK)
  </code></pre>
  
  <p>I got this error</p>
  
  <blockquote>
    <p>AssertionError: 'token' not found in {'username': [ErrorDetail(string='This field is required.', code='required')]}</p>
  </blockquote>
  
  <p>Model of own user</p>
  
  <pre><code>class UserProfile(AbstractBaseUser, PermissionsMixin):
  
      email = models.EmailField(max_length=255, unique=True)
      name = models.CharField(max_length=255)
      is_active = models.BooleanField(default=True)
      is_staff = models.BooleanField(default=False)
  
      USERNAME_FIELD = 'email'
  </code></pre>
  
  <p>And Setting</p>
  
  <pre><code>AUTH_USER_MODEL = 'core.UserProfile'
  </code></pre>