Rewrite auth module