fix logout issues