rename type to facilityType to match openlmis
end to end basic program and product sync

also:
- refactor / cleanup
- authenticate rest api access
- tests