Added UserDetail api code, tests and doc