The easiest option is to use the Hotspot system with a login.html that immediately redirects to “/login?username=VALID_USERNAME&password=VALID_PASSWORD&dst=http://page.you.want.to.go.to” to automatically log the user in without any action on his side, and then redirecting to the specified URL on successful login. The wiki and manual contain details about how to set up Hotspots.