I'm trying to create a rest api using an existing database. I am also using drf token authentication and have created tokens for all existing users. When I try to enter my username and password to get my token from my ObtainAuthToken View I receive the following error:

 "non_field_errors": [
        "Unable to log in with provided credentials."

My code is as follows:


from django.shortcuts import render
from django.db import connection
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework import generics
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from rest_framework.permissions import IsAuthenticated
from rest_framework.renderers import JSONRenderer

from api import serializers
from api import  models

from itertools import chain
# Create your views here.

class UserLoginApiView(ObtainAuthToken):
   """Handle creating user authentication tokens"""
   renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES


from django.urls import path, include
from rest_framework.routers import DefaultRouter, SimpleRouter
from api import views

urlpatterns = [

    path('login', views.UserLoginApiView.as_view()),


from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager, UserManager
from django.conf import settings
from django.dispatch import receiver
from django.urls import reverse

class UserProfileManager(BaseUserManager):

    def create_user(self, email, username, password=None):
        if not email:
            raise ValueError('User must have an email address')

        email = self.normalize_email(email)
        user = self.model(email=email, username=username)


        return user

    def create_superuser(self, email, username, password):
        user = self.create_user(email, username, password)

        user.is_superuser = True
        user.is_staff = True

        return user

def myoverridenmeta(name, bases, adict):
    newClass = type(name, bases, adict)
    for field in newClass._meta.fields:
        if field.attname == 'last_login':
            field.column = 'lastLogin'
            field.db_column = 'lastLogin'
    return newClass

class InvshellUsers(AbstractBaseUser, PermissionsMixin):
    id = models.AutoField(db_column='userID', primary_key=True)  # Field name made lowercase.
    username = models.CharField(max_length=20,unique=True)
    password = models.CharField(max_length=50)
    first_name = models.CharField(db_column='firstName', max_length=50, blank=True, null=True)  # Field name made lowercase.
    lastname = models.CharField(db_column='lastName', max_length=50, blank=True, null=True)  # Field name made lowercase.
    email = models.CharField(max_length=50, blank=True, unique = True, null=True)
    orgid = models.IntegerField(db_column='orgID', blank=True, null=True)  # Field name made lowercase.
    territoryid = models.IntegerField(db_column='territoryID', blank=True, null=True)  # Field name made lowercase.
    locationid = models.IntegerField(db_column='locationID', blank=True, null=True)  # Field name made lowercase.
    role = models.CharField(max_length=15, blank=True, null=True)
    status = models.CharField(max_length=15, blank=True, null=True)
    timezone = models.CharField(max_length=50, blank=True, null=True)
    last_login = models.DateTimeField(db_column='lastLogin', blank=True, null=True)  # Field name made lowercase.
    loginattempts = models.IntegerField(db_column='loginAttempts', blank=True, null=True)  # Field name made lowercase.
    passchangedate = models.DateTimeField(db_column='passChangeDate', blank=True, null=True)  # Field name made lowercase.
    activatedate = models.DateTimeField(db_column='activateDate', blank=True, null=True)  # Field name made lowercase.
    addedby = models.CharField(db_column='addedBy', max_length=50, blank=True, null=True)  # Field name made lowercase.
    uom = models.IntegerField(blank=True, null=True)
    uomtemp = models.IntegerField(db_column='uomTemp', blank=True, null=True)  # Field name made lowercase.

    objects = UserProfileManager()
    USERNAME_FIELD = 'username'
    REQUIRED_FIELDS = ['email']

    def get_short_name(self):
        return self.username

    def __str__(self):
        return self.email
    __metaclass__ = myoverridenmeta
    class Meta:
        managed = True
        db_table = 'invShell_users'

Relavent info from settings.py




Any help figuring out this error is much appreciated