Added a timeout to the rest client instanteation

Previously the rest client would just hang when the server didn't respond to a request.  Added a timeout.