Using user.get_username() instead of user.username.

This solves an error when using a auth model that does not have a username field.
Merge pull request #1833 from dpanesso/master

Using user.get_username() instead of user.username.