Thank you for the comments.
My solution to get rid of localstorage:
I use websockets changed the message to json which now transports the initial message and the status.
I changed the websocket server so it now allows for communication between clients and also broadcasts everything that is sent to the server to all clients.
For the clients js i keep the variables that i dont want to change (message) and just send them again with the json structure. the big benefit is now that i could reduce functions to clean the message and i have more control and flexability