made the cookies server side now, instead of client side.