refactoring core app to auth