adding session elements, and basic logout functionality