added logout and disconnect