Typecheck the authenticator

Same as #203 but done statically.