Atoms in a Magnetic Field: Quantum Mechanical Treatment