The heterogeneous elastoplastic deformation of structural glasses is explored using the framework of the random first-order transition theory of the glass transition along with an extended mode-coupling theory that includes activated events. The theory involves coupling the continuum elastic theory of strain transport with mobility generation and transport as described in the theory of glass aging and rejuvenation. Fluctuations that arise from the generation and transport of mobility, fictive temperature, and stress are treated explicitly. We examine the nonlinear flow of a glass under deformation at finite strain rate. The interplay among the fluctuating fields leads to the spatially heterogeneous dislocation of the particles in the glass, i.e., the appearance of shear bands of the type observed in metallic glasses deforming under mechanical stress.