Rework session initialization to make it possible to init without an HTTPRequest.