_objectManager->get(\Magento\Customer\Model\Session::class)->isLoggedIn()) { $this->_redirect('*/*/'); return; } $this->_view->loadLayout(); // set account create url $loginForm = $this->_view->getLayout()->getBlock('customer.new'); if ($loginForm) { $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl()); } $this->_view->renderLayout(); } }