First principles calculations of electrical conductivity and giant magnetoresistance of periodic multilayers and spin valves (invited)