Nexus 5: WiFi Authentication Fails - Fix and Keyboard Observation
Like many that I have read about here, connections to WiFi with the Nexus 5 was frustrating for me too. The other day while attempting to connect to a WAP I repeatedly got the usual authentication failed response with an access point that I am registered with and I know works with other devices.
I eventually noticed that when I was entering my username and pass code, the [swiftkey] keyboard insert prompt would jump ahead one space after my username was typed in - just as I selected to drop down to the pass code field. Forcing a backspace in the username field then entering the passcode got me connected right away.
I haven't seen this "fix" if it in fact is one, posted anywhere. I hope it helps.