Fix bug related to authorization and logging.