Added Login/Logout functionality.