added authentication to api pages