added basic session management