sso impl and templates