Check for internet connection when the app launches and display an alert if there is no connection.