Update SessionExist to close the db connection

close the mysql connection