Updated Authorize method