Cookies getting deleted after closing the browser

Hi, I am trying to achieve the
remember me
option through vaadin cookies it works fine till I don’t close the browser. But when I close the brower my cookie gets deleted. Can someone help me with this ?