Migrate usercontroller to appframework