fixed logout and output