bug fix logout