Energy stable finite element schemes and their applications to two-fluid flow problems