Reading the blog tutorial i wondered, why it uses two different places to perform some “command” in a Portlet. In the menu portlet the logout command is performed in init(). But the login portlet uses renderContent() to check, if login has to be performed.
The reason for login portlet not doing so is because it tries to reuse the $form object. If we move the code to init(), we would need a class member to remember the $form object.