add better logging for authentication