diff -r 7ed19ada219e code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml
--- a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml	Tue Oct 05 21:36:58 2010 +0200
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml	Sat Oct 09 18:53:05 2010 +0200
@@ -817,45 +817,26 @@
 	<action handler="leave_modal" />	    <!-- must leave modal first if another modal is to be displayed after this one -->
 	<action handler="" params=""/>				
 </proc>
+<proc id="proc_valid_message_box_cancel" >
+	<action handler="leave_modal" />	    <!-- must leave modal first if another modal is to be displayed after this one -->
+	<action handler="" params=""/>				
+</proc>
 
 
 
 
-<group type="modal" id="valid_message_box" exit_click_out="false" posref="MM MM" w="1024" h="768"
+
+<group type="modal" id="valid_message_box" exit_click_out="false" posref="MM MM" w="420" child_resize_h="true" child_resize_hmargin="20"
  on_enter="proc" on_enter_params="proc_valid_message_box_ok" options="no_bordure" mouse_pos="false"
 >
-	<view type="bitmap" posref="MM MM" id="log" texture="new_launcher_bg.tga" global_color="false" render_layer="-1" />
+	<instance template="log_box_frame" id="bk" posref="MM MM" sizeref="wh" w="0" h="0" />
+	<view type="text" id="text" posref="MM MM" line_maxw="420" w="420" x="0" y="12" color="135 243 28 255" fontsize="12" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/>
 	
-	<view type="text" id="text" posref="MM MM" line_maxw="412" w="412" x="0" y="0" color="135 243 28 255" fontsize="18" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/>
-	
-	
-	<ctrl type="button" button_type="push_button" id="but_cancel" posref="BR BR" x="-304" y="157"
-								tx_normal="log_over.tga" tx_over="log_over.tga" tx_pushed="log_over.tga"
-								color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0"
-								onclick_l="leave_modal" params_l="" />
-
-	<view type="text" id="txt_log" posparent="but_ok" posref="MM MM" hardtext="uittOK" shadow="true" fontsize="16" y="-2" color="208 212 182 255" />
-
-
-	<ctrl type="button" button_type="push_button" id="but_ok" posparent="but_cancel" posref="TL TR" x="3" y="0"
-								tx_normal="log_over.tga" tx_over="log_over.tga" tx_pushed="log_over.tga"
-								color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0"
-								onclick_l="proc" params_l="proc_valid_message_box_ok" />
-
-	<view type="text" id="txt_ok" posparent="but_ok" posref="MM MM" hardtext="uittOK" shadow="true" fontsize="16" y="-2" color="208 212 182 255" />
-	<view type="text" id="txt_cancel" posparent="but_cancel" posref="MM MM" hardtext="uittCancel" shadow="true" fontsize="16" y="-2" color="208 212 182 255" />
-
-	<ctrl type="button" button_type="push_button" id="but_quit" posref="TR TR" x="-30" y="-30"
-								tx_normal="quit_over.tga" tx_over="quit_over.tga" tx_pushed="quit_over.tga"
-								color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0"
-								onclick_l="login_quit" />	
+	<ctrl style="log_std_but" id="but_ok" posparent="text" posref="BM TL" x="10" y="-6" onclick_l="proc" params_l="proc_valid_message_box_ok" hardtext="uittOK"/>
+	<ctrl style="log_std_but" id="but_cancel"  posparent="text" posref="BM TR" x="-10" y="-6" onclick_l="proc" params_l="proc_valid_message_box_cancel" hardtext="uittCancel"/>
 
 </group>
 
--->
-
-
-
 
 <!--
 <group type="modal" id="valid_message_box" exit_click_out="true" posref="MM MM" w="156" child_resize_h="true" child_resize_hmargin="12" 
diff -r 7ed19ada219e code/ryzom/client/data/gamedev/interfaces_v3/out_v2_select.xml
--- a/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_select.xml	Tue Oct 05 21:36:58 2010 +0200
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_select.xml	Sat Oct 09 18:53:05 2010 +0200
@@ -429,6 +429,40 @@
 	<action handler="remove_link" params="id=resume_session_but_init" />
 </proc>
 
+<!-- ******************** -->
+<!-- * MESSAGE BOX      * -->
+<!-- ******************** -->
+<proc id="proc_valid_message_box_ok" >
+       <action handler="leave_modal" />            <!-- must leave modal first if another modal is to be displayed after this one -->
+       <action handler="" params=""/>
+</proc>
+<proc id="proc_valid_message_box_cancel" >
+       <action handler="leave_modal" />            <!-- must leave modal first if another modal is to be displayed after this one -->
+       <action handler="" params=""/>
+</proc>
+
+<group type="modal" id="valid_message_box" posref="MM MM" w="300" h="180" 
+					child_resize_h="true" child_resize_hmargin="20"
+					mouse_pos="false" escapable="false" exit_click_out="false" display="false">
+					
+	
+	<instance template="outgame_popup" id="back" posref="TL TL" />
+	
+	
+	<view type="text" id="text" posref="TM TM" x="0" y="-60" color="255 255 255 255" global_color="false" line_maxw="284"
+		fontsize="17" shadow="true" multi_line="true" multi_line_space="0"/>
+
+	<ctrl style="valid_txt_button" id="submit" posref="BM TL" posparent="text" x="0" y="-6" hardtext="uittOK"
+					onover="play_sound" params_over="name=specie_but_over"
+					onclick_l="proc" params_l="proc_valid_message_box_ok" />
+
+	<ctrl style="valid_txt_button" id="cancel" posref="BM TR" x="0" y="-6" hardtext="uittCancel" posparent="text"
+					onover="play_sound" params_over="name=specie_but_over"
+					onclick_l="proc" params_l="proc_valid_message_box_cancel" />
+</group>
+
+
+
 
 <!-- ***************** -->
 <!-- *  MAIN WINDOW  * -->
diff -r 7ed19ada219e code/ryzom/client/src/events_listener.cpp
--- a/code/ryzom/client/src/events_listener.cpp	Tue Oct 05 21:36:58 2010 +0200
+++ b/code/ryzom/client/src/events_listener.cpp	Sat Oct 09 18:53:05 2010 +0200
@@ -30,11 +30,12 @@
 #include "input.h"
 #include "interface_v3/interface_manager.h"
 #include "interface_v3/custom_mouse.h"
-
+#include "far_tp.h"
 
 using namespace NLMISC;
 
 extern CActionsManager Actions;	// Actions Manager.
+extern CLoginStateMachine LoginSM;
 
 //---------------------------------------------------
 // CEventsListener :
@@ -123,24 +124,22 @@
 	// Window closed.
 	if(event == EventDestroyWindowId)
 	{
-		// Interface saving
-		CInterfaceManager::getInstance()->uninitInGame0();
-
-		/* YOYO:
-			quitting safely sometimes crash in CContinentMngr::select()
-			quitting unsafely crash always in ~CEntityManager()
-			Id did not succeed to reproduce the crash in CContinentMngr::select().
-			Hence I let it to quit "safely", calling release methods
-		*/
-		releaseMainLoop(true);
-		release();
-
-		// quit properly crash info
-		extern void quitCrashReport ();
-		quitCrashReport ();
-
-		// kill process
-		exit(EXIT_SUCCESS);
+		if (LoginSM.getCurrentState() == CLoginStateMachine::st_ingame)
+		{
+			if( CInterfaceManager::getInstance()->isInGame() )
+			{
+				CInterfaceManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:quit_dialog");
+			}
+			else
+			{
+				CInterfaceManager::getInstance()->runActionHandler("quit_ryzom", NULL, "");
+			}
+		}
+		else
+		{
+			CInterfaceManager::getInstance()->runActionHandler("login_quit", NULL, "");
+		}
+		return;
 	}
 	// Event from the Mouse (ANGLE)
 	if(event == EventGDMouseMove)
diff -r 7ed19ada219e code/ryzom/client/src/interface_v3/action_handler_game.cpp
--- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp	Tue Oct 05 21:36:58 2010 +0200
+++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp	Sat Oct 09 18:53:05 2010 +0200
@@ -1121,9 +1121,8 @@
 public:
 	void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
 	{
-		/* todo game_exit
 		game_exit = true;
-		nlinfo("User Request to Quit the game"); */
+		ryzom_exit = true;
 	}
 };
 REGISTER_ACTION_HANDLER( CAHQuitGame, "quit_game");
@@ -1139,9 +1138,8 @@
 		// If we are not connected, quit now
 		if((!ConnectionReadySent) && (!FarTP.isLeavingEGS()))
 		{
-			game_exit = true;
-			ryzom_exit = true;
 			nlinfo("User Request to Quit ryzom");
+	                CInterfaceManager::getInstance()->validMessageBox(CInterfaceManager::WarningIconMsg, CI18N::get("uiQuitConfirm"), "quit_game", "","leave_modal", "", "ui:outgame");
 		}
 		else
 		{
diff -r 7ed19ada219e code/ryzom/client/src/login.cpp
--- a/code/ryzom/client/src/login.cpp	Tue Oct 05 21:36:58 2010 +0200
+++ b/code/ryzom/client/src/login.cpp	Sat Oct 09 18:53:05 2010 +0200
@@ -1293,6 +1293,17 @@
 	virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
 	{
 		nlinfo("CAHLoginQuit called");
+		CInterfaceManager::getInstance()->validMessageBox(CInterfaceManager::WarningIconMsg, CI18N::get("uiQuitConfirm"), "login_quit_real", "","leave_modal", "", "ui:login");
+	}
+};
+REGISTER_ACTION_HANDLER (CAHLoginQuit, "login_quit");
+
+// ***************************************************************************
+class CAHLoginQuitReal : public IActionHandler
+{
+	virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
+	{
+		nlinfo("CAHLoginQuitReal called");
 
 		loginFinished = true;
 		loginOK = false;
@@ -1300,7 +1311,7 @@
 		LoginSM.pushEvent(CLoginStateMachine::ev_quit);
 	}
 };
-REGISTER_ACTION_HANDLER (CAHLoginQuit, "login_quit");
+REGISTER_ACTION_HANDLER (CAHLoginQuitReal, "login_quit_real");
 
 
 // ***************************************************************************
