cookie signing and restart fixes