Added support for persisting websocket hostname and port to localstorage