webauth bundles have strict requirements, one of them being under 1MB. You also can't really get all fancy with any type of programming languages.
I would recommend looking under the 5508 WLC download section on CCO for the examples and start from there.
Have you looked at the code for the default webauth or download the webauth bundle form CCO? You can use that HTML code and modify that to your liking. There is also a document on the forum regarding webauth but I don't have the link for that.
Sent from my iPhone