Login and Logout flow corrected. Added confirm for logout.