Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revision 8941)
+++ wp-admin/admin-ajax.php	(working copy)
@@ -17,9 +17,28 @@
 require_once('../wp-load.php');
 require_once('includes/admin.php');
 
-if ( !is_user_logged_in() )
+if ( !is_user_logged_in() && $_POST['action'] !== 'autosave' )
 	die('-1');
 
+if ( !is_user_logged_in() && $_POST['action'] == 'autosave' ) {
+	$id = isset($_POST['id'])? (int) $_POST['id'] : 0;
+        if ( is_ssl() )
+                $proto = 'https://';
+        else
+                $proto = 'http://';
+
+	$login_url = site_url( 'wp-login.php' );
+	$message = sprintf( __('<b>ALERT: YOU ARE LOGGED OUT!</b> Could not save draft <a href="%s" target="blank">Login here</a>'), $login_url, date( __('g:i:s a'), current_time( 'timestamp', true ) ) );
+        $x = new WP_Ajax_Response( array(
+                'what' => 'autosave',
+                'id' => $id,
+                'data' => $message,
+                'supplemental' => array()
+        ) );
+        $x->send();
+	die('-1');
+}
+
 if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) {
 	if ( !current_user_can( 'manage_categories' ) )
 		die('-1');
@@ -828,4 +847,4 @@
 	die('0');
 	break;
 endswitch;
-?>
\ No newline at end of file
+?>
