layout the foundation of the session flow