rename rest.isAuthorized to prodIsAuthorized
revert name of isProdAuthorized to isAuthorized
make rest.checkTokenFn a type for unit testing
test when rest.auth() returns error in endpoint handler