Worst case scenario and last resort, you can hard reset the device through the bootloader. Each device has it's own way to enter the bootloader menu.
The most common way (with htc devices) is to power down the device. Hold the down volume button in, then press and hold the power button until the bootloader is displayed. Another variation is to press and hold both volume up and volume down at the same time (not an easy feat), then press the power button until the bootloader displays.
Once the bootloader menu appears there will be a hard reset option. Use the volume down button to navigate the menu, and volume up to confirm (there will be instructions once you enter bootloader mode).
[If anyone knows how to enter bootloader mode on different manufacturers, please leave a comment below]