Rewrite authentication component