Used urllib2 instead of socket

This is a fix for hathway redirecting http connections. We make https connnections. However urlopen doesn't verify the certificate (which we should to ensure that we have successfully made a connection with google).  

I still haven't checked this. Will let you know if it works.