Checking if device is online before trying to connect to server in settings.