test for 401 unauthorized error