Added session support. DOESN'T WORK, TRY WITH CAUTION (ask Jaime).