Updated authorization check