Persist custom variables in session

This PR persists Custom Variables in the session so that they are played out e. g. after a redirect.