Functional integrals for spin