Variational methods for singular Liouville equations