Added getting host for client from window.location.