Log.log(Log.TRACE, MODULE, response);
Log.log(Log.LEVEL_TRACE, MODULE, response);
		private boolean login() {            Object [] params = {g.toString() };			status(StatusUpdate.LEVEL_GENERIC, grRes.getString(MODULE, "logging", params));						try	{				URL url = g.getGalleryUrl(SCRIPT_NAME);				String urlPath = url.getFile();				Log.log(Log.TRACE, MODULE, "Url: " + url);								NVPair form_data[] = {					new NVPair("cmd", "login"),					new NVPair("protocal_version", PROTOCAL_VERSION),					new NVPair("uname", g.getUsername()),					new NVPair("password", g.getPassword())				};				Log.log(Log.TRACE, MODULE, "login parameters: " + Arrays.asList(form_data));								HTTPConnection mConnection = new HTTPConnection(url);				HTTPResponse rsp = mConnection.Post(urlPath, form_data);								if (rsp.getStatusCode() >= 300 && rsp.getStatusCode() < 400) {					// retry, the library will have fixed the URL					status(StatusUpdate.LEVEL_GENERIC, grRes.getString(MODULE, "redirect"));										rsp = mConnection.Post(urlPath, form_data);				}								if (rsp.getStatusCode() >= 300)	{                    Object [] params2 = {new Integer(rsp.getStatusCode()), rsp.getReasonLine()};					error(grRes.getString(MODULE, "httpErr", params2));					return false;				} else {					String response = new String(rsp.getData()).trim();					Log.log(Log.TRACE, MODULE, response);										if (response.indexOf("SUCCESS") >= 0) {						status(StatusUpdate.LEVEL_GENERIC, grRes.getString(MODULE, "loggedIn"));						return true;					} else {                        Object [] params2 = { response };						error(grRes.getString(MODULE, "logErr", params2));						return false;					}				}			} catch (IOException ioe) {				Log.logException(Log.ERROR, MODULE, ioe);                Object [] params3 = {ioe.toString() };				status(StatusUpdate.LEVEL_GENERIC, grRes.getString(MODULE, "error", params3));			} catch (ModuleException me) {				Log.logException(Log.ERROR, MODULE, me);                Object [] params3 = {me.getMessage() };				status(StatusUpdate.LEVEL_GENERIC, grRes.getString(MODULE, "errReq", params3));			}				return false;		}