fixed logout and edit bug