Nonlinear Ekman-Hartmann layers and the flow outside