Allow Django 1.5 custom users

I've added some code to allow people to use [custom users](https://docs.djangoproject.com/en/dev/topics/auth/customizing/#substituting-a-custom-user-model) which were introduced in Django 1.5.

As a bonus I fixed a misspelling of a setting which was causing a warning!