Updated session handling to be done by a module