Completed setUser functions in API