in reply to Getting username and password from the URL.

And, for the sake of completeness... if you're using mod_perl, you can get the username from the Apache request record ($r):
my $user = $r->connection->user;