auth: change post function as authenticate function