ion auth to module(not full work), fix some tmeplate bug