base user auth template implementation