Spin polarized currents in magnetic and superconducting structures