Fix login tests to check whether logins succeed/fail as expected