Fix pin-server redirect errors

#2770

When there is a token error there is no longer an infinite redirect loop.