    // Get session/room ID from URL parameters
        var needsSessionId = false;
        if (urlParams.has("session")) {
            roomID = urlParams.get("session");
        } else if (urlParams.has("s")) {
            roomID = urlParams.get("s");
        } else if (urlParams.has("id")) {
            roomID = urlParams.get("id");
        } else {
            needsSessionId = true;
        }

        // Get password from URL parameters
        if (urlParams.has("password")) {
            pa