Added login functionality

Added ability to register accounts and log in users.  Note that it is
currently impossible for a user to access the account validation code,
making registration impossible.