I have solved my own question. It appeared that the problem is Chrome's problem. It continues to work in background, so the cookie values do not disappear. I tried my app with firefox and works perfectly.
For more info: https://code.google.com/p/chromium/issues/detail?id=128513