Pass cookies to the websockets in the client script

Use the HTTP cookies for creating the websockets, this fixes the client script for me.