When button is pressed it checks to see if connected to internet