Persistent custom variables

This PR persists the Custom Variables in the session in order to make them survive a redirect.