Handle connection status