Add support for custom User model

Add support for Custom user model in django 1.5 while remaining backwards compatible.