auth changes. Not a final but working version.