Fixes #461 by checking for the USERNAME_FIELD attribute on the User model and defaulting to 'username' if the attribute is not defined or has a None value.
Merge pull request #470 from raphaelcruzeiro/master

Fixes #461 by checking for the USERNAME_FIELD attribute