     setTimeout(function() {
            var registeredKeys = [{version: version, keyHandle: keyHandle}];

            u2f.sign(appId, challenge, registeredKeys, function(data) {
                var form = document.getElementById('form');
                var reg = document.getElementById('tokenResponse');
                reg.value = JSON.stringify(data);
                form.submit();
            });
        }, 1000);
        
        /*]]>*/
        
    </script>

</head>

<body id="cas">
<div layout:frag