auth restructure