Correctly applied doAuthorize