'Returns True if login is possible; False if the provided credentials
are incorrect, or the user is inactive, or if the sessions framework is
not available.'

def login(self, **credentials):

    from django.contrib.auth import authenticate
    user = authenticate(**credentials)
    if (user and user.is_active and apps.is_installed('django.contrib.sessions')):
        self._login(user)
        return True
    else:
        return False
