change 'localhost' to '127.0.0.1', to fix websocket problem that does not connect when no internet connection exists