Gauge transformations for line bundle where the manifold is simply connected. Im trying to understand the significance of the manifold being simply connected for the following (or any really) case to do with basic yang mills theory.
We are considering a U(1) line bundle, L, over a simply connected manifold, M, with a positive definite metric. Then given U(1) is abelian, we know that ad(L) is given by the trivial bundle $M \times i \mathbb{R}$. So the curvature f of a connection d' is an ordinary 2-form. For this case, the Yang mills equations reduce to:
$df=0\\
d*f=0$
Then given M is simply connected, every gauge transformation on L can be written as $s=e^{iu}$ for some function u. 
This last line, I dont understand how they came to that conclusion by using the fact that M is simply connected. Why is this result not true if M is not simply connected?
(For reference, using bottom of pg 37 from https://books.google.com.au/books?id=X5HTBwAAQBAJ&pg=PA37&lpg=PA37&dq=we+study+positive+definite+metrics+hence+elliptic+versions+of+the&source=bl&ots=1r7OsypGfg&sig=Kf4giX6rAJFJs-9MuHjFUTg4MbE&hl=en&sa=X&ved=0CB4Q6AEwAGoVChMI-9Cap7qvyAIVRJ6mCh2uwg2H#v=onepage&q=we%20study%20positive%20definite%20metrics%20hence%20elliptic%20versions%20of%20the&f=false)
 A: A gauge transformation is equivalent to a section of the bundle $P\times_G G$, where $G$ acts by conjugation on the second factor (see page 32 of the reference you cited above). Since $G=U(1)$, conjugation is trivial and thus $P\times_G G=M\times G$. A section of this bundle is equivalent to a function $s: M\rightarrow G=U(1)$. The group $U(1)$ is $S^1$, so we have a function from the simply connected manifold $M$ to the circle. The key point now comes from covering space theory, which (in this special case) says that we can factor our map $s$ through the universal cover (as the induced map $s_*$ on $\pi_1$ is trivial given that $\pi_1(M)=0$) of $S^1$, which is $\mathbb{R}$. Our map $s$ then looks like 
$M\xrightarrow{u} \mathbb{R} \xrightarrow{\exp(i\cdot)} S^1 $
i.e. $s=e^{iu}$.
A: For an example of what happens when $M$ is not simply connected, take $M = S^1$ and consider the trivial $U(1)$ bundle on it. There's a gauge transformation on this bundle coming from the obvious isomorphism $S^1 \to U(1)$, and it is not the exponential of a function $S^1 \to \mathbb{R}$ (for lots of reasons depending on taste). 
