[Yuqing] because the Authentication code got lost by Ao, so implement it again. :(