`loginUser` updates cached current user

Modify `UserRepository.loginUser` to update the cached current user
used by `UserRepository.getCachedCurrentUser`.

/to @raymondfeng please review