Add AJAX for make requests and add the server code