Fixed bug where cookie would not be persistent