The auroral ionosphere and thermosphere