allow email address to be used as login name

Unless otherwise specified, all code here is licensed GPLv2