Modify Resource to support header in actions

here is the example how to use this

$scope.signIn = function () {
      Authenticate.signIn(null,null,
          function (data, headers) {
              console.log(headers('x-token'));
  
          },
          function(data, status, headers, config) {
              console.log('fail');
          },
          { 'Authorization': 'Basic NAdGVfghsezdC5jb206cGFzc3dvcmQhMQ==' }
      );