moved the api model code from the usershelper into the user model