Register and login/logout users

Added the ability to register users, login and logout.