Add login to /users/:id API for current user (#13155).
Patch by Jérôme Bataille.
Authored by: jplang 2013-02-18
Parent: [r11436]
Child: [r11438]