Django 1.5 Custom User model support

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

Signed-off-by: Patrick Taylor <patricktaylor@mac.com>