use https://drupal.org/project/restws basic httpauth https://drupal.org/node/1913358