function authenticate($user, $password)
    {
        if (!is_string($user) || !isset(self::$levels[$user])) {
            throw new InvalidArgumentException('user = ' . print_r($user, true));
        }
        if (self::$levels[$this->user] >= self::$levels[$user]) {
            return true;
        }

        if (!is_string($password)) {
            throw new InvalidArgumentException('password = ' . print_r($password, true));
        }

        $res = $this->execute(ucfirst(__FUNCTION__), array($user, $password));
        if ($res) {
            $this->user = $user;
        }
        return $res;
    }