updated controllers to support JSON API calls for mobile devices