The Beginning and the End: The Meaning of Life in a Cosmological Perspective