Backwards compatible Django 1.5 Custom User model support

Added compatibility for both Django Custom User models and pre-Django 1.5 User models