Index: tags/Ver2.0.2/xpressme_integration_kit/admin/index.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/admin/index.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/admin/index.php	(revision 298)
@@ -557,5 +557,9 @@
 	}		
 }
-	
+
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+require_once($mydirpath.'/wp-load.php');	
 	
 require_once '../../../include/cp_header.php' ;
@@ -565,6 +569,4 @@
 // branch for altsys
 if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
-	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
-	$mydirpath = dirname( dirname( __FILE__ ) ) ;
 
 	// common libs (eg. altsys)
Index: tags/Ver2.0.2/xpressme_integration_kit/blocks/widget_block.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/blocks/widget_block.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/blocks/widget_block.php	(revision 298)
@@ -22,5 +22,4 @@
 		
 		global $table_prefix,$wpdb,$xoops_db;
-		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/wp-load.php');	
 		global $wp_registered_sidebars, $wp_registered_widgets;
 		
Index: tags/Ver2.0.2/xpressme_integration_kit/include/xpress_render.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/include/xpress_render.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/include/xpress_render.php	(revision 298)
@@ -213,7 +213,7 @@
 	$xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link'];
 	$xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link'];
-	$xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link('echo=0'));
-	$xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link('echo=0'));
-	$xpress_data['now_user_level'] = xpress_now_user_level('echo=0');
+	$xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link(false));
+	$xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link(false));
+	$xpress_data['now_user_level'] = xpress_now_user_level(false);
 
 	$xoopsTpl->assign('xpress', $xpress_data);
Index: tags/Ver2.0.2/xpressme_integration_kit/wp-config.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/wp-config.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/wp-config.php	(revision 298)
@@ -97,4 +97,7 @@
 	require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. 
 	require_once(ABSPATH.'wp-settings.php');
+	if (!is_object($xoopsUser)){	// before login auth cookie clear
+		wp_logout();
+	}
 	wp();
 	
Index: tags/Ver2.0.2/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 298)
@@ -20,34 +20,34 @@
 	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
 
-
 	if ($xoopsModule){
-		if (!is_object($xoopsUser)){
+		if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
+			return false;
+
+		if (is_object($xoopsUser)){			// When the user is logging in xoops
+			if ( ! empty($current_user) ){
+				$xoops_user = $xoopsUser->getVar("uname");
+				if ($current_user->user_login == $xoops_user){	// If xoops login user and wordpress current user are the same
+					return;
+				}
+			}
+			if (check_xpress_auth_cookie()){	//The cookie is login user's or it checks it
+				if ( $user = wp_validate_auth_cookie() ) {
+					// When the user meta prefix is different according to the change in the xoops data base prefix, it restores it. 
+					if (!check_user_meta_prefix($user)){	
+						repair_user_meta_prefix();
+					}
+					wp_set_current_user($user);
+					return ;
+				}
+			}				
+			return xpress_login();	
+		} else {							// For the xoops guest
+			if ( ! empty($current_user) ){	// When a current user of wordpress is set, a current user is cleared. 
 				wp_set_current_user(0);
-				wp_clearcookie();
-
-//				wp_logout();		 // When IE is used, it becomes page error by the guest if the wp_logout() is executed here. 
-			 	return false;
-		}
-		if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
-			return false;
-
-		if ( ! empty($current_user) ){
-			$xoops_user = $xoopsUser->getVar("uname");
-			if ($current_user->user_login == $xoops_user)
-				return;
-		}
-
-		if (check_xpress_auth_cookie()){	//The cookie is login user's or it checks it
-			if ( $user = wp_validate_auth_cookie() ) {
-				if (!check_user_meta_prefix($user)){
-					repair_user_meta_prefix();
-				}
-
-				wp_set_current_user($user);
-				return ;
+				wp_logout();
+				wp_clear_auth_cookie();
 			}
-		}				
-		xpress_login();	
-
+			return false;
+		}
 	} else {
 		// WP2.7 original
@@ -95,5 +95,4 @@
 	}
 	wp_set_current_user(0);
-	wp_clearcookie();
 	return 0;	
 }
Index: tags/Ver2.0.2/xpressme_integration_kit/wp-content/themes/xpress_default/header.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/wp-content/themes/xpress_default/header.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/wp-content/themes/xpress_default/header.php	(revision 298)
@@ -41,7 +41,11 @@
 	</div>
 	<div class="xpress-operation-link">
-		<?php if (xpress_is_wpmu()) : ?>
-		<a href="<?php echo get_blog_details(1)->siteurl ; ?>/"><?php _e('Main Page','xpress')?></a> | 
-		<?php endif; ?>
+		<?php
+			if(xpress_is_wpmu()){
+				$blog_details = get_blog_details(1);
+				$site_url = $blog_details->siteurl;
+				echo '<a href="' . $site_url . '/">' . __('Main Page','xpress') . '</a> | ';
+			}
+		?>
 		<a href="<?php echo get_option('home'); ?>/"><?php _e('Blogs Home','xpress')?></a> 
 		<?php if(xpress_is_contributor()) { echo ' | ' ; xpress_post_new_link(__('Post New','xpress')); }?>
Index: tags/Ver2.0.2/xpressme_integration_kit/xoops_version.php
===================================================================
--- branches/Ver2.0/xpressme_integration_kit/xoops_version.php	(revision 285)
+++ tags/Ver2.0.2/xpressme_integration_kit/xoops_version.php	(revision 298)
@@ -31,5 +31,5 @@
 $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ;
 $modversion['description'] = constant( '_MI_XP2_DESC');
-$modversion['version'] = "2.01";
+$modversion['version'] = "2.02";
 $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;";
 $modversion['author'] = "toemon (http://ja.xpressme.info)";
