Implemented auth of RESTful API