added handler for OPTIONS requests, to be more REST compliant and AngularJS-friendly