added flush method to database class
flush sessions after delete old sessions