added hasconnection check

allows check to ensure that user is connected to internet, default site
is google.com since google will never go down anyways.