fixbug for GTNPORTAL-3399 and some other bug of oauth