Refactoring, add `auth` support