Made an error message pop up when connection is lost.