Moved session from query string to context template

And added "context template" to initial state docuemnt