private boolean signin() throws SDKException, SignInException{
        final long current_time = System.currentTimeMillis();
        HashMap<String, String> signinData = new HashMap<>();
        
        if (session_pass != null && session_expired_time > current_time
                && time_of_last_signin_attempt > mpc.lastMPCSet()) {
            return true;
        }
        LGR.info("signing-in to the metadata account");
        if (sign_in_error && time_of_last_signin_attempt > mpc.lastMPCSet()){
            LGR.warning("error at last sign-in; not using these credentials");
            return false;
        }
        time_of_last_signin_attempt = current_time;
        signinData.put(API_LOGIN_USER, mpc.getMPCUser());
        signinData.put(API_LOGIN_PASSWORD, mpc.getMPCPass());
        String session_data = post(LOGIN_URL, signinData);
        sign_in_error = true;
        SignInException e2 = null;
        try {
            final ArrayList<String> session_array = (ArrayList<String>)
                    getJSONMapper().readValue(session_data, ArrayList.class);
            session_pass = session_array.get(0);
            sign_in_error = false;
            session_expired_time = current_time + SESSION_DURATION;
            return true;
        } catch (JsonMappingException e) {
            LGR.log(Level.SEVERE, null, e);
            LGR.log(Level.INFO,
                    "Failed to sign in.  Please check your credentials {0}",
                    session_data);
            e2 = new SignInException("Failed to sign-in");
        } catch (IOException ex) {
            LGR.log(Level.SEVERE, null, ex);
        }
        if (e2 != null) {
            throw e2;
        }
        return false;
    }