How can I trigger an action when a user logs in?

Is there any way to run a script when a user logs in to the Rancher UI?