Refined login

Added Logout and loading