when the record is inserted, the insert behavior stores the ID of the new record in a session variable.
on the registration page, double click the insert record behavior, if the session being created is the same name as the one created at login, then the user will be automatically logged in.
the rest of what you wrote, i do not understand.