modularized auth