moved auth methods to new module