added user_error_handler for input errors, added API_KEY as a env variable