fix bug in delete & logout