Refactor AccountController and ManageController