Fixing login failure detection