Added some more code to handle user authentication.  This is still a work in progress.