improved authentication exception handling.