simplify the structure of Auth library