fix issue when username is an email. '.com' will be missing in controller