  We prove new structural results for the rational homotopy type of the
classifying space $B\operatorname{aut}(X)$ of fibrations with fiber a simply
connected finite CW-complex $X$. We first study nilpotent covers of
$B\operatorname{aut}(X)$ and show that their rational cohomology groups are
algebraic representations of the associated transformation groups. For the
universal cover, this yields an extension of the Sullivan-Wilkerson theorem to
higher homotopy and cohomology groups. For the cover corresponding to the
kernel of the homology representation, this proves algebraicity of the
cohomology of the homotopy Torelli space. For the cover that classifies what we
call normal unipotent fibrations, we then prove the stronger result that there
exists a nilpotent dg Lie algebra $\mathfrak{g}(X)$ in algebraic
representations that models its equivariant rational homotopy type. This leads
to an algebraic model for the space $B\operatorname{aut}(X)$ and to a
description of its rational cohomology ring as the cohomology of a certain
arithmetic group $\Gamma(X)$ with coefficients in the Chevalley-Eilenberg
cohomology of $\mathfrak{g}(X)$. This has strong structural consequences for
the cohomology ring and, in certain cases, allows it to be completely
determined using invariant theory and calculations with modular forms. We
illustrate these points with concrete examples. As another application, we
significantly improve on certain results of Berglund-Madsen on self-homotopy
equivalences of highly connected even-dimensional manifolds, and we prove
parallel new results in odd dimensions.
