Add observer to the controller_action_predispatch event

Add observer to the controller_action_predispatch that will check for
the require login flag and redirect the user to the home page with a
message.
Add check for customer login page

Add a check to see if the user is logged in.
Alse check for Mage_Customer_AccountController to allow for users to
register/login.
Add redirect and message

Add a redirect and message options when the user is not logged in.
Use getStoreConfigFlag

Update the checkRequireLogin function to use getStoreConfigFlag