added a regexp to strip out non-standard characters at the end of the username, tested successfully