Set connected to false on disconnect

Make leave dialog only pop up when connected
and logged in.