close telnet session, switch to proper input when changing control mode