AC losses in high-temperature superconductors