Ireland had a dramatic comeback in the Aviva to draw with Hungary 2-2, but were outplayed away from home against Armenia, where they lost 2-1.