logout with promise