Updated references and fixed an issue when a username or password contained an ampersand (&)