Authrepository Refactor