user auth and other cleanups