Added basic Login/Logout functionality, with failure handling