diff --git includes/common.inc includes/common.inc
index 9fc82bb..6c9ade6 100644
--- includes/common.inc
+++ includes/common.inc
@@ -3697,7 +3697,7 @@ function drupal_add_js($data = NULL, $options = NULL) {
       $javascript = array(
         'settings' => array(
           'data' => array(
-            array('basePath' => base_path()),
+            array('basePath' => base_path(), 'cleanUrls' => variable_get('clean_url', 0)),
           ),
           'type' => 'setting',
           'scope' => 'header',
diff --git modules/overlay/overlay-parent.js modules/overlay/overlay-parent.js
index 607b8b4..6d36d53 100644
--- modules/overlay/overlay-parent.js
+++ modules/overlay/overlay-parent.js
@@ -24,7 +24,13 @@ Drupal.behaviors.overlayParent = {
       // the document and only handle events that bubble up. This allows other
       // scripts to bind their own handlers to links and also to prevent
       // overlay's handling.
-      .bind('click.drupal-overlay mouseup.drupal-overlay', $.proxy(Drupal.overlay, 'eventhandlerOverrideLink'));
+      .bind('click.drupal-overlay mouseup.drupal-overlay', $.proxy(Drupal.overlay, 'eventhandlerOverrideLink'))
+      .bind('drupalOverlayOpen', function() {
+        if (Drupal.settings.user.uid && !$('#disable-overlay').length) {
+          $('<a class="overlay-exclude" href="' + Drupal.settings.basePath + (Drupal.settings.cleanUrls ? '?q=' : '') + 'user/' + Drupal.settings.user.uid + '/edit" >' + Drupal.t('Disable modal overlay') + '</a>')
+          .wrap('<div id="disable-overlay" class="element-invisible">').parent().prependTo('body');
+        }
+      });
   }
 };
 
diff --git modules/user/user.module modules/user/user.module
index b81c860..92b35b3 100644
--- modules/user/user.module
+++ modules/user/user.module
@@ -1802,6 +1802,8 @@ function user_admin_paths() {
  * Implements hook_init().
  */
 function user_init() {
+  global $user;
+  drupal_add_js(array('user' => array('uid' => $user->uid)), 'setting');
   drupal_add_css(drupal_get_path('module', 'user') . '/user.css', array('preprocess' => TRUE));
 }
 
