You can make ‘login’ a url. Just add login as an a-record in your DNS-server.
ex: value: login ip:10.50.5.1
The hotpspot will redirect url-request to login page automaticly.
You could do the same with logout, but you would have to make this a-record point to a different IP on another webserver with a webpage redirecting back to “http://10.50.5.1/logout.html” on the Mikrotik Hotspot server.
you won’t need second because if you’re already logged in router will give you a page with your session time and “log off” button..
so logout can point to the same ip