Also note the uamip value is already being adding through your code to the source page where the logout link is waiting for the same value. UAMIPInLogout
The default seeting HSS_SettingsA should probably have these in it as shown in red although there is a typo of logoff shown there HSS_SettingsEdittedLogoutLink