Add ajax dispatcher

Add a dispatcher for ajax request and an example for the connexion in
ajax.