Refactor API

Refactor API::authorize function to API::isAuthorized