Set session object in the scope.