In this paper we refine our recently constructed invariants of 4-dimensional 2-handlebodies up to 2-deformations. More precisely, we define invariants of pairs of the form (W,\omega), where W is a 4-dimensional 2-handlebody, \omega is a relative cohomology class in H^2(W,\partial W;G), and G is an abelian group. The algebraic input required for this construction is a unimodular ribbon Hopf G-coalgebra. We study these refined invariants for the restricted quantum group U = U_q \mathfrak{sl}_2 at a root of unity q of even order, and for its braided extension \tilde{U} = \tilde{U}_q \mathfrak{sl}_2, which fits in this framework for G=\mathbb{Z}/2\mathbb{Z}, and we relate them to our original invariant. We deduce decomposition formulas for the original invariants in terms of the refined ones, generalizing splittings of the Witten-Reshetikhin-Turaev invariants with respect to spin structures and cohomology classes. Moreover, we identify our non-refined invariant associated with the small quantum group \bar{U} = \bar{U}_q\mathfrak{sl}_2 at a root of unity q whose order is divisible by 4 with the refined one associated with the restricted quantum group U for the trivial cohomology class \omega=0.