The interplay between localization and superconductivity