Fixed KeyError on authentication without a username

Some authentication backends do not use username+password. (e.g. token authentication)