public static Login DoLogin(String username, String password, String base_url) { try { String postData = WebConnection.GeneratePostData( new Argument() { name = "username", value = username }, new Argument() { name = "password", value = password }, new Argument() { name = "device", value = "WindowsPC" }, new Argument() { name = "os", value = "Windows" }, new Argument() { name = "latitude", value = "" }, new Argument() { name = "longitude", value = "" } ); WebConnection doRequests = WebConnection.GetRequestsAsPost(PathUtils.Join(base_url, Login.URL_LOGIN), postData); String content = doRequests.content; Login login = Login.FromJson(content); login.username = username; login.Container = doRequests.cookieContainer; return(login); } catch (Exception ex) { } return(new Login() { auth = false }); }