persist custom variables in session