public String login(String vCloudUrl, String username, String orgName, String password) throws Exception 
	{
		String loginString = Utils.CLOUD_URL_PREFIX + vCloudUrl + Utils.CLOUD_URL_SUFFIX;
		String creds;
		if(username.contains("@")) {
			creds = username +":" + password;
		} else {
			creds = username + "@" + orgName + ":" + password;
		}
		creds = new String(Base64.encodeBase64(creds.getBytes()));
		
		HashMap<String, String> headers = new HashMap<String, String>();
		headers.put(Utils.AUTHORIZATION_HEADER, Utils.CRED_PREFIX + creds);
		headers.put(Utils.ACCEPT_HEADER, Constants.XML_CONTENT_TYPE);
		
		HttpResponse response = RestClient.doPost(loginString, null, headers);
		StatusLine status = response.getStatusLine();
		if( status.getStatusCode() == 401) {
			throw new Exception("Unauthorized credentials. Please check username and password");
		}
		
		HttpClient httpClient = RestClient.getHttpClient();
		authToken = RestClient.getAuthToken(response);
		return RestClient.getResponseString(httpClient, response);
	}