Add PIN support
Change restful API controller to service