Add Authorize tests and error message support code