[server][FaceRest] Clean up test_loginFailure() with a helper function.