Make cookie update when enter button is pressed