Squid + MySQL act as Hotspot

Hi, All

i see the hot-spot for internet cafe or in starbuck coffee.
they can
:: generate username / password
:: time limit or useage-timming countdown.

Now , i want to know anyone have experience about
REDHAT + Squid + MySQL . to act like hot-spot ?
:: Can gen. username+password
:: Can gen. time for usage per username

Can u share knowledge ?
Can u guide/step for me ? sir.

Thank you very much