MNT: rework session initialization a bit