Refactor and fixed minor issues with Forbidden/Unauthorized responses