With an Apple phone you can recover through iCloud, by with Google Nexus 5 (as well as Pixel) you can still Go through the debug sequence. Which at its base involves turn the phone on with the sequence by holding volume down while pressing power. This will put you into debug mode. Select the right option the volume up and down and select is the power button.
You want to get down to recovery mode. This gets you to yet another screen and the magic sequence is hold the volume up key and press power so to enter another menu system. And look for wipe data and then go to reboot.