changed doCheckToken validation