Added support for custom user model.
Changed datetime to django.utils.timezone.