display useful errors to the user when changing username

also, spaces at the beginning and end of a username are automatically
stripped