Make sure account returns the correct username

Fixes #806