Set title of website template via context script

Hello team,

Is there an option where we could set the section’s title built using page builder by context script? We are trying to achieve a title to vary based on login.

Appreciate the support as always.