[gh-804] Trim the username to avoid ' jdoe2' logins
Merge pull request #808 from ericras/issue-804

Closes #804 Trim the username to avoid ' jdoe2' logins