authtypes refactor