logout refresh bug fix