Handle logout command and default enter for login and escape for cancel