fix invalidate login bug

this fixes a non deterministic bug that caused logins
to be improperly scoped in the invalidate_login method.
It also adds a spec to cover the case that is fixed by this patch
and removes some other code smell
Merge branch 'master' into bug/MSP-10859/invalidate-login
version bump
checking if any change happens on status

not just untried to invalid

MSP-10859
Merge branch 'bug/MSP-10859/invalidate-login'
bumping the version