Modify isAuthorized() method