Localization and superconductivity