Added suport for custom user models in django 1.5.

The change is in contrib/*/models.py. As far as I know this seems to be the most elegant solution.