Created generalized web API class
Implemented authentication