change auth func