Fix ajax request, prepare to handle JSON answer