SWC-1143: validate alias during registration, and when setting username on login
small update to message
add tests
Merge pull request #782 from jay-hodgson/SWC-1143

Swc-1143: check format up front, and check alias duplicates.