Added error handling to websocket server and dynamic address resolution to phone/tablet js