isLoggedIn() check was incorrect. Switching to isConnected() or isConnecting()