Added first bits of session management