logout bug fix router bug fix