redir bug when login or logout