working version of auth integration
make it all compile again, and remove NPE