fix many codes to make ModuleController work using UsersController as a sample