Derry are through to the league final after beating Mayo