Moved session initialisation into the init() method.