How do I login to the Django Rest browsable API when I have a custom auth model?
<p>I have a custom user model as follows in <code>account/models.py</code></p>

<pre><code>from django.contrib.auth.modles import AbstractUser
from django.db.models.signals import post_save
from rest_framework.authtoken.models import Token
from django.db import models
from django.dispatch import receiver
from django.conf import settings

@receiver(post_save, sender=settings.AUTH_USER_MODEL)                                
def create_auth_token(sender, instance=None, created=False, **kwargs):               
    if created:                                                                      
        Token.objects.create(user=instance)                                          

class UserProfile(AbstractUser):                                                     
    gender = models.CharField(max_length=1,default='') 
</code></pre>

<p>and in <code>settings.py</code></p>

<pre><code>REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.TokenAuthentication',
    )
}
</code></pre>

<p>...</p>

<pre><code>AUTH_USER_MODEL = "account.UserProfile"
</code></pre>

<p>However, whenever I try to log into the browsable API, it asks me to use a correct username and password, and I am using credentials of users who are both marked as superusers and staff.</p>

<p>The <code>manage.py runserver</code> console shows this status message:</p>

<pre><code>[27/Jul/2016 20:41:39] "POST /api-auth/login/ HTTP/1.1" 200 2897
</code></pre>