fix bug when logout, should reset rights in engine