def METHOD_NAME(app: web.Application):
    settings: SMTPSettings = get_email_plugin_settings(app)
    cfg = settings.dict()
    if INDEX_RESOURCE_NAME in app.router:
        cfg["LOGIN_REDIRECT"] = f"{app.router[INDEX_RESOURCE_NAME].url_for()}"
    app[APP_LOGIN_OPTIONS_KEY] = LoginOptions(**cfg)