Trim spaces from either end of username when creating or updating. Fixes #309