Post the ACTUAL script that you are using right now and I will help you go through it. You should have 2 main components..
1. A simple form with a username / password box
2. A script that it "posts" to the cpanel page.
For example say you had the following variables (I'm writing this in php)
PHP Code:
$domain = "domain.com";
$username = "bobby245";
$password = "pass2323";
You would then build the URL like this...
PHP Code:
$url = "http://".$username.":".$password."@".$domain.":2082/";
Then either insert a static link on page OR use something like the http redirect to get the user to that page. Try writing out the code, testing it and then posting your results here.