Added Logout, fixed error msg and formatting