starting session logic