MikroTik Hotspot External login page vs. RADIUS server

Hello, I am fairly new to MikroTik RouterOS and I was wondering if the following logic is correct:

When configuring Hotspot feature of a MikroTik router with External login page as explained here: https://wiki.mikrotik.com/wiki/HotSpot_external_login_page , with the login page being a custom PHP/ASP/etc. hosted on the web, when user successfully authenticates on the said page, how does the web page then inform the MikroTik router about successful authentication? By setting a cookie?
What I am trying to achieve is to have a website that hosts a separate database of usernames, and a login page on this website that the MikroTik router’s Hotspot feature would redirect to when connection is established and authenticate the users there.
I understand that using a RADIUS server would do the same but I am trying to build this using custom database of users.