refactor events tests with authentication