Support Django 1.5 custom user models

See #790