Sorry for the late reply but thanks for mentioning
@dcsapak. I injected the cookie into the websocket connection and now everything works just fine. It seems like I forgot to set the CORS attributes for the PVEAuthCookie so it wasn't set correctly and therefor not passed to the websocket. Please excuse my own dumbness in this matter.
Kind regards