authenticate method fix