Morse theory on path spaces