make use of sync and async NSURLConnections

and added better error handling if no internet connection is
established.