Creating user with access to internet without hotspot login page

Hello.
I have page where are login buttons with facebook and vk. If user will login with his account to my page he will receive ability to use internet from hotspot. Now: when user connect to hotspot he is redirecting to hotspot login page.
What i am trying to make: when user connect to hotspot he will be redirected to page with login buttons and only after his authentication, he will receive ability to use internet. So question - how to create user via api that will have access to internet with skiping that hotspot login page. I am using ruby api. I dont know where to add user. If i add user to hotspot users - there is no effect.