By default, Dynamics Portal is connected to our CRM server, and the return URL (the redirection page after log off) is to our website (www.DynamicsObject.Com)
To point the portal to your Dynamics CRM (online or on premise) and redirect it to your website or a page on your website, you need to edit the file web.config, included in the published and in the Visual Studio solution.
Open web.config with Notepad.
In the <appSettings> section of the xml file, firstly select either 0, 1 or 2 for On premise, Office 365 (online) or IFD respectively.
Modify CRM_Url to the URL of your CRM server and enter User_Name, Password and Domain, if your CRM is not online.
The key Company_Url is the return URL after log off portal, such as your main company website or a page on a website.
Save changes and exit