cleanend up some cookie setting code so it now properly labels the cookie