You have a check for user logged in within the template, but user would never see the template if logged in if you do the controller check here.  This should be removed so the templates always rendered.