logout the db.