fixed wrong logout implementation