implemented basic API with authentication