Client side handling of 401 response