  On a given Riemann surface, we construct a path integral based on the
Liouville action functional with imaginary parameters. The construction relies
on the compactified Gaussian Free Field (GFF), which we perturb with a
curvature term and an exponential potential. In physics this path integral is
conjectured to describe the scaling limit of critical loop models such as Potts
and O(n) models. The potential term is defined by means of imaginary Gaussian
Multiplicative Chaos theory. The curvature term involves integrated 1-forms,
which are multivalued on the manifold, and requires a delicate regularisation
in order to preserve diffeomorphism invariance. We prove that the probabilistic
path integral satisfies the axioms of Conformal Field Theory (CFT) including
Segal's gluing axioms. We construct the correlation functions for this CFT,
involving electro-magnetic operators. This CFT has several exotic features:
most importantly, it is non unitary and has the structure of a logarithmic CFT.
This is the first mathematical construction of a logarithmic CFT and therefore
the present paper provides a concrete mathematical setup for this concept.
