First step of trying to merge auth code with existing codebase