dd-wrt is an open source firewall that has been ported to most brands of routers. You have to make sure to get the version that matches your router, and they have a help system to point you at it. From there, it's pretty easy to flash it onto the router.

Built in to dd-wrt are a few different hotspot management systems to choose from. I've never set one up myself, but they're designed for exactly the situation you're facing. So, I'd assume that at least one of them would be fairly straightforward to set up.

Drake Christensen