  We study the behaviour of the Kauffman bracket skein modules of 3-manifolds
under gluing along surfaces. For this purpose we extend the notion of Kauffman
bracket skein modules to $3$-manifolds with marking consisting of open
intervals and circles in the boundary. The new module is called the stated
skein module.
  The first main results concern non-injectivity of certain natural maps
defined when forming connected sums along a sphere or along a closed disk.
These maps are injective for surfaces, or for generic quantum parameter, but we
show that in general they are not injective when the quantum parameter is a
root of 1. The result applies to the classical skein modules as well. A
particular interesting result is that when the quantum parameter is a root of
1, the empty skein is zero in a connected sum where each constituent manifold
has non-empty marking.
  We also prove various non injectivity results for the Chebyshev-Frobenius map
and the natural map induced by the deletion of marked balls.
  We then consider the general case of gluing along a surface, showing that the
stated skein module can be interpreted as a monoidal symmetric functor from a
category of "decorated cobordisms" to a Morita category of algebras and their
bimodules. We apply this result to deduce several properties of stated skein
modules as a Van-Kampen like theorem as well as a computation through Heegaard
decompositions and a relation to Hochshild homology for trivial circle bundles
over surfaces.
