refactor to using before hooks to validate client an api keys in fake api