Add an optional username field, and allow logging in with either email
or username. (Username is stored as a custom field for backward
compatibility.) Addresses issue #10.
Update default login template to optionally accept a username instead of an email address.