Prepare for authentication rewrite