Allow hyphen in username (fix first part of issue #441)

I currently do not have a user account with a hyphen, so I can't test if the bug is completely resolved.