Function useConnectionStatus