Add disconnect from db logic