role to be assigned

I am testing in live mode on a trial page. I am expecting a new current user (with no role) to be assigned a role called “freemium” which has a specific role id when i click on #button1

in console, the value resp that is returned is displaying as undefined. When i reload the page after clicking on the button, the user still doesn’t have any role assigned.