Added debug logging to authorization setup