This function is generally called captive portal. It is used by hotels etc. This is not generally a feature found on consumer routers. Even if you were to flash a router to third party firmware all it does is allow you to forward requests to a external server. This generally is too advanced a function to put on the router itself.