Hi,
TruClient reset te browser state when iteration starts.
If you wish to move Login to Init Action and Logout to End Action you need to disable "Simulate New User between iterations" in the script Run Time Settings. By disabling it TruClient will stop reset the browser state between iterations.
Alternatively you can move back the logic to the Actions section.
BTW: you can create multiple actions and divide the logic among them (that will make it easier to work with each action)
Regards,
Shlomi