Clean up some of the federation event authentication code for clarity.