refactor, avoid auth prompt