improve security using IoC and simplify authorization setting.