Wifi Pineapples have a lot of codebase which can be used / reworked to do something like this, throwing up a captive portal on a web server.