A thermodynamic theory for finite elastic-plastic deformations