final public function set($varname, $value = NULL, $namespace = 'default')
    {
        //stores a value to a varname in a namespace of this session
        $session = $this;

        if (!isset($namespace) || empty($namespace)) {
            //@TODO Throw an exception, we need a name or use the default;
            throw new Exception("Cannot set new Session variable to unknown '{$namespace}' namespace");
            return false;
        }


        //If we don't have a registry to that namespace;
        if (!isset($session->registry[$namespace])) {
            //Create it;
            $registry = new Registry($namespace);
            $session->registry[$namespace] = $registry;
        }

        //echo $namespace;
        //@TODO, check if the regitry is not locked before adding
        if (!$session->isLocked($namespace)) {
            $registry = $session->getNamespace($namespace);
            $registry->set($varname, $value);
        }
        //If auth is locked

        return $session;
    }