I think you would want to have 2 tables, one to track the logins, and another to track the searches for the session.
the structure for the table to track logins would be something like:
logins:
loginID - Primary key
loginUserID - relates to the users.userID table
on the login page, the the security assist authenticate user behavior will store the logged in uses ID in a session. make sure the authenticate user behavior does not redirect to another page, then add an insert behavior to store the logged in users ID using the session variable binding.
make sure the insert code gets added after the security assist authenticate user code.
the insert behavior will also store a session with the loginID value for the was created.
for tracking the searches, you would need a table with the following structure:
searchID - Primary Key
searchLoginID - relates to the logins.loginID
search Terms
on the results page, you would add another insert behavior to capture the search. use the loginID session variable for the searchLoginID column.
you will need to add bindings to the bindings panel depending on the search form method, POST or GET for the search form, then use those bindings in the insert behavior.