added logging to authentication