Avoid key error in userdata gathering process.

Also ensure that if there is no extractable username info
we fail with a good 400