Add Javascript routing
Merge pull request #49 from weso/ajax-js-routing

Add Javascript routing and AJAX error handling