      evtSource.close()
        })
        evtSource.addEventListener('error', (event) => {
            console.error(event)
            evtSource.close()
        })

        evtSource.addEventListener('qrcode', (event) => {
            const url = decodeURIComponent(event.data)
            qrcode.makeCode(url)
            document.querySelector('.qrcode-wrapper').classList.remove('expired')
        }, false)
        evtSource.addEventListener('token', (event) => {
            const token = JSON.parse(event