code: def create_login_manager(self, app) -> LoginManager:
          
          lm = LoginManager(app)
          lm.login_view = "login"
          lm.user_loader(self.load_user)
          return lm
docs: Override to implement your custom login manager instance
  
              :param app: Flask app