bugfix: commit changes to $_SESSION as soon as they are made. works around issues where $_SESSION is not written to during a page request