iPhone 3.0 contains a log-in overlay that makes logging into many WiFi hotspots easier. Unfortunately, the implementation makes logging into some WiFi hotspots impossible. When you connect to a WiFi network, the iPhone tries to connect to www.apple.com. If the hotspot uses a captive portal (meaning that apple.com would redirect to the captive portal), the iPhone launches a WebSheet that loads the captive portal, which usually allows you to log into the network.
On some networks, however, the captive portal page may not provide a way to login. In my case, the page simply provides instructions saying that I need to connect to the VPN to access the Internet. There's no apparently way to exit the HotSpot login without also disconnecting from the WiFi network, which makes it impossible to connect to my VPN.
If you have a jailbroken phone, a workaround to disable the login is to edit /etc/hosts (using a text editor such as nano) and add this line:
0.0.0.0 www.apple.com
This makes connecting to www.apple.com return an error, and thus prevents the HotSpot login from taking over. If you connect to a network that does uses a captive portal login, you can still login using Safari, as in previous OS versions.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20090620193818332