you can use the security assist wizard to generate the login and registration pages.
on the login page, if you select the Auto Login option, there will be 2 authenticate user behaviors added, the first one is used if the form is submitted, the other is used if the auto login checkbox is checked, double click the first one to edit it, and change the trigger to the Login button pressed instead of the default any form post trigger.
you can then add the login and registration pages to another main page using Framework builder plugins.
all of the other behaviors on the pages created by the wizard use the form buttons as the trigger, and each of the forms use unique names for the buttons.