Store node current id into the session.