title: Django admin not working with custom auth backend
body: <p>I've a custom user model and an authentication backend.
  When I'm using shell the authentication function works fine but when it comes to Admin site login, it is just not working.</p>
  
  <p>The code comes from <a href="https://docs.djangoproject.com/es/1.9/topics/auth/customizing/#a-full-example" rel="nofollow">Official Django docs</a></p>
  
  <h2>settings.py</h2>
  
  <pre><code># Authentication
  AUTH_USER_MODEL = 'BBUser.UserInfo'
  AUTHENTICATION_BACKENDS = [
      'BBUser.models.AuthBackend',
      'BBUser.models.AdminAuthBackend',
  ]
  </code></pre>
  
  <h2>models.py</h2>
  
  <pre><code>class UserInfo(AbstractBaseUser, PermissionsMixin):
      openid = models.CharField(max_length=50, null=False, unique=True)
      nickname = models.CharField(max_length=30, null=True)
      ...
  
      USERNAME_FIELD = 'openid'
      REQUIRED_FIELDS = []
      ...
  
      objects = UserManager()
  
  
  class AdminAuthBackend(object):
      def authenticate(self, openid=None, password=None):
          print "custom auth"
          login_valid = ('100' == openid)
          pwd_valid = ('tobeno.2' == password)
          if login_valid and pwd_valid:
              try:
                  user = UserInfo.objects.get(openid=openid)
              except UserInfo.DoesNotExist:
                  user = UserInfo(openid=openid, password='get from .py')
                  user.is_staff = True
                  user.is_superuser = True
                  user.save()
              return user
          return None
  
      def get_user(self, user_id):
          try:
              return UserInfo.objects.get(pk=user_id)
          except UserInfo.DoesNotExist:
              return None
  </code></pre>
  
  <p>As I've put a <code>print</code> in AdminAuthBackend.authenticate(), so I know when it is executed.</p>
  
  <p>When I'm invoking <code>authenticate()</code> from shell, the custom auth method is invoked while in admin page, it is not.</p>
  
  <p>Any help is appreciated.</p>