Liverpool have overcome Bayern Munich 3-1 to reach the Champions League quarter-finals.