Fix broker test cases and remote-user auth plugin