restructure authorizatoin