added session checking for node functions