Make cookie key environment dependent

More than once I've been bitten by cookie issues when testing between staging and production environment. This change will prevent a lot of hair-pulling.