Black holes, quantum theory and cosmology