Added user auth and form validation

Added user authentication to login and form validation to the
registration form.  Added session as well as an encryption key for the
cookies