Issue 2793 log login failures

needs to be merged with Master as well