added require_login() for pages inaccessible to the public and implemented its use
also comments