Stored procedure to delete old sessions. Added step to nightly jobs to run this procedure.
Small changes from Harvard version