Added log in, log out, and register mechanisms.