Proper logging of login errors