Fixed keys in JSON user output and made it so that uid and display name are always either both present or both absent.
Merge commit 'b922ece3747d80ed583e7a45eba6cb9b342ef612' into gsoc13