updated auth, fixed bug in cookie mock.