[minor] Better authorization logic