Rewritten Authorize related code of AuthStorage

Rewritten Authorize related code of AuthStorage with service
provider.