Limit repeated queries when token is not valid.
Merge branch '4.1' into 4.2