Adding session variable to save state