In Security Assist there is a Show Region Server Behavior that is located under the Server Behaviors panel (Window -> Server Behaviors). All you have to do is select the region and then apply the Server Behavior which only shows certain regions on your page based on a Security Assist Rule, and since you have used Security Assist to generate the login and registration page, login rules should have been already created for you.
You could look at more documentation at:
securityassist/
This should give you more flexibility instead of hand coding the check using the session.
let me know if you still have any other questions.