just use a standard php login/password page than put the resulting session id into an applet parameter
spmething like :
<applet .....
<param name="id" value="<? echo session_id(); ?>" >
</applet>
also if you want a single entry point to your application so that all your url will look like http//yoursite.com/ juste make an index.php that redirect to the correct php script using your designed rules. alternatively you can remove all header so the client will have trouble to know you are using php
something like that (nb : this is only the very base idea dont use as it, for example you should prefer to create object rather than include file as in the following sample ):
index.php
<?
//set the session by hand
if(is_set($_POST['ID']))
session_id($_POST['ID']);
//here verify authentication
//if user is NOT trusted/logged exit
if($_GET['p']==1)
include(" ../private/page1.php");
if($_GET['p']==2)
include(" ../private/page1.php");
?>
then you will use http://yoursite.com/?p=1 or http://yoursite.com/?p=2 as URL, in the applet you should put the ID parameter (from the parm tag) as a post or get parameter depending on your index.php script.
the only active public script shoul be index.php, all other file should be put in a private directory that cannot be read from outside