add logout dialog and basically finish logout