auth helper improvement