changed connection test

uses curl -I now instead of ping and looks for a 401 response
specifically