Migrate functionality from d6 that allowed users to login with either their e-mail address or their username.  #1350