adds authorization hooks