Properly handle case insensitive e-mail (closes #517)