Add authorization. Add rest api.