add error calback on client js
bug fix: fixed token router