fix basic connection procedure
implement QuitCommand