Rewriting the authentication page