Replaced User with settings.AUTH_USER_MODEL to support Django 1.5's custom user models.