Enable using dots and underscores in usernames

Let's enable using dots and underscores in the user names. Those 'special'
characters should only be present in the middle of usernames, so
'john.doe' is valid, '.johndoe' is invalid.
Merge pull request #1541 from mlocati/username-with-dots-and-underscores

Enable using dots and underscores in usernames