Improvements in logging and exc handling for auth.