Added logout and error handling for login