private static function unserializesession($serializedstring) {
        $variables = array();
        $a = preg_split("/(\w+)\|/", $serializedstring, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
        $counta = count($a);
        for ($i = 0; $i < $counta; $i = $i + 2) {
            $variables[$a[$i]] = unserialize($a[$i + 1]);
        }
        return $variables;
    }