Okay I think I've got it at least preliminary testing seems to be okay.
I will summarize it here for posterity
to stay on the same page requires 3 types of modifications
1. Login, use provided redirect for ssi_login
2. Logout, use provided redirect for ssi_logout
3. The only thing left is unsuccessful logins (maybe SMF can consider this sometime).
There are two parts to this problem
a. SMF loads different templates / sub-templates to prepare the browser screen for display.
These have to be disabled or rather, I provided an alternative so that if my application is detected,
it would do something more appropriate for my application (e.g. donothing)
b. unsuccessful login's are detected at several positions within Login2() and then returned to the
calling function. Instead of a straight forward return, I conditionally diverted the return so that
if the application is detected, it would redirect to the URL I wanted.
I am going to keep this thread open for a while so that if I did something dumb, somebody can tell me.
Thanks to all who have helped me.
Thanks and Regards.