Added check that URL and credentials are working during construction