public void init(Context context) {
        try {
            // get the cookie that contains session information:
            Cookie cookie = context.getCookie(applicationCookiePrefix
                    + ninja.utils.NinjaConstant.SESSION_SUFFIX);
            // check that the cookie is not empty:
            if (cookie != null && cookie.getValue() != null
                    && !cookie.getValue().trim().equals("")) {
                String value = cookie.getValue();
                // the first substring until "-" is the sign
                String sign = value.substring(0, value.indexOf("-"));
                // rest from "-" until the end it the payload of the cookie