Field theoretical approach to magnetically coupled layered superconductors