refactor(auth) req: write, end -> end