implemented basic ajax-request functionality
corrected controller and api