title: Why authenticate() return None for inactive users?
body: <p>I have <code>CustomUser</code> like following : </p>
  
  <pre><code>        class CustomUser(AbstractBaseUser, PermissionsMixin):
              email = models.EmailField(max_length=100, unique=True)
              username = models.CharField(max_length=20, unique=True)
              is_active = models.BooleanField(default=False)
              is_staff = models.BooleanField(default=False)
              ...
  </code></pre>
  
  <p>which is <code>active</code> <code>default=False</code>
  After user registration automatically  handle <code>UserLogin</code> def which is :</p>
  
  <pre><code>        def UserLogin(request):
              if request.POST:
                  username = request.POST['username']
                  user = authenticate(username=username, password=request.POST['password'])
                  print('user :', user)  # which is print None if user inactive 
                  if user is not None:
                      print('is user active:', user.is_active)   # should print True or False  
                      if user.is_active:
                          login(request, user)
                          ... 
                      else:  # handle user inactive
                          ...
                  else:  # for None user 
                     ...
  </code></pre>
  
  <p>I still trying understanding why <code>authenticate</code> return <code>None</code> for inactive users ?</p>
  
  <p>After searching I found smilier issue <a href="https://stackoverflow.com/questions/39993714/user-is-authenticated-always-returns-false-for-inactive-users-on-template">user.is_authenticated always returns False for inactive users on template
  </a> But didn't find an answer for my situation   </p>