T2130: Write to userlogins log only when log_logins=true
Also prevent from duplicate failure entries in that log.