Fixed typo and tests. bugid:112416
Refactored the code of v2 user resource. 112543
Added some fields to v2 resources. bugid:112514