Looking at the code you have to set the cookie it seems that it should be set to expire in one day. You can check this out by viewing the cookie in FireFox. You do this by going to Tools > Options > Privacy > remove individual cookies.
In here find the domain your cookie is coming from and locate the cookie. When you select the cookie you should be able to see all of it's attributes including the expiration date.
If you would like the cookie to end with the session you should try leaving the expiration days blank. If there is no value specified it should exist only during the session. Please post back and let us know what you discover.