I am having problems with Spring security. When i using default security everything is working [1]: https://i.stack.imgur.com/0dwJQ.png ,but when i using it, cookie not working [2]: https://i.stack.imgur.com/LLM37.png Cookies are still created when I log in, but when I closed my browser, the cookie disappears. When i login: [3]: https://i.stack.imgur.com/FghHk.png When i closed browser: [4]: https://i.stack.imgur.com/av0ca.png Please help me, thanks!