add test function to check authoriztion every request