users controller replaced with api endpoint