add authoriation function