little auth related refactoring 2