Reference: django2.0: When the authentication of the auth module is 0 for is_active, it always returns None solution