Determining whether connected to Internet