Change authenticate code