Login/Logout logic implemented