detect gw_stat before login
fix detection bug