updated IP to use window.location.host for automatic detection