diff --git a/src/ts/main.ts b/src/ts/main.ts index b863f26..27df705 100644 --- a/src/ts/main.ts +++ b/src/ts/main.ts @@ -429,7 +429,7 @@ async function openVM(vm: VM): Promise { // Connect to node chatMessage('', `${vm.id}
`); - let username = Config.Auth.Enabled ? null : localStorage.getItem('username'); + let username = Config.Auth.Enabled ? (auth!.account?.username ?? null) : localStorage.getItem('username'); let connected = await VM.connect(vm.id, username); elements.adminInputVMID.value = vm.id; w.VMName = vm.id;