Fixing build and authentication refactoring