Added error checking for 401 response from TTNC