Fix issue in Unauthorized and Forbidden requests