Shalom,
First, try setting the parameter TMOUT in the user profile. This will time out idle sessions not in any application.
Second your limit script can provide the user the choice of terminating the old session. User larry for example hung. His session is active. User larry is perfectly empowered to issue a kill on his previous process under all circumstances.
So.
echo "You are already logged in. Do you want to close your previous session?:"
read yesno
If the user answers yes, issue a kill for the process ID the script that limits logins has clearly identified.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com