Global impact of ionospheric outflows on the dynamics of the magnetosphere and cross-polar cap potential