Full auth system refactor