fix eventhandling for authorize