Add refresh button and create updateStatus and checkConnectivity functions