Communicating with the backend using XHR