User API and tests updated