Well, after some brain sucking, i've got the solution, i have been 
creating several cgi objects, so finally it was a mess.

Code clean-up and working now.
But i see that sessions are stored in /tmp, and even setting the 
'session_expires' with Time.now + 10, files remain in harddisk.

Also, i've seen that session.delete works and deletes the current 
session file, but if it's not called (a user closes the browser when he 
want) the file remains in hd, wasting resources.

Do you know how to manage those files?