Update person doc with last login information

I would like to have a Last Login View for people in the NAB to see when a person logged onto DWA. We are using the standard web configuration with a custom login form.

I would like to know, how can I get a field in the person doc to udate with the last login when a user authenticates. I am either going to use the existing comment field or add a new field called lastlogin.

Where do I put the agent and what should the agent be?