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.
Merge pull request #12 from phibangbui/PhiBui

added hasconnection check