fix login/logout redirect