api/auth/basic_test: add test for errInvalidCredentialPair, fix test logic