A modal function to create a session