Viscoplasticity for instabilities due to strain softening and strain-rate softening