Chore/refactor auth