def create_auth_token(sender, instance, raw, created, **kwargs):
    """Create token when a user is created (from rest_framework).
    """
    if not raw:
        if created:
            sender.objects.create(user=instance)