Added decorator for checking api key.