Refactor the code into a helper function: loadUserInfo().

Signed-off-by: Thiago Farina <tfarina@chromium.org>