Index: bp-themes/bp-default/sidebar.php
===================================================================
--- bp-themes/bp-default/sidebar.php	(revision 3383)
+++ bp-themes/bp-default/sidebar.php	(working copy)
@@ -5,6 +5,8 @@
 
 	<?php do_action( 'bp_inside_before_sidebar' ) ?>
 
+	<?php if ( !dynamic_sidebar( 'sidebar' ) ) : ?>
+
 	<?php if ( is_user_logged_in() ) : ?>
 
 		<?php do_action( 'bp_before_sidebar_me' ) ?>
@@ -55,6 +57,8 @@
 
 	<?php endif; ?>
 
+    <?php endif; ?>
+
 	<?php /* Show forum tags on the forums directory */
 	if ( BP_FORUMS_SLUG == bp_current_component() && bp_is_directory() ) : ?>
 		<div id="forum-directory-tags" class="widget tags">
@@ -66,8 +70,6 @@
 		</div>
 	<?php endif; ?>
 
-	<?php dynamic_sidebar( 'sidebar' ) ?>
-
 	<?php do_action( 'bp_inside_after_sidebar' ) ?>
 
 	</div><!-- .padder -->
Index: bp-core/bp-core-widgets.php
===================================================================
--- bp-core/bp-core-widgets.php	(revision 3383)
+++ bp-core/bp-core-widgets.php	(working copy)
@@ -5,6 +5,7 @@
 	add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Members_Widget");') );
 	add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Whos_Online_Widget");') );
 	add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Recently_Active_Widget");') );
+	add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Login_Widget");') );
 }
 add_action( 'bp_register_widgets', 'bp_core_register_widgets' );
 
@@ -224,6 +225,96 @@
 	}
 }
 
+/*** LOGIN WIDGET *****************/
+
+class BP_Core_Login_Widget extends WP_Widget {
+	function bp_core_login_widget() {
+		parent::WP_Widget( false, $name = __( 'BuddyPress Login', 'buddypress' ) );
+	}
+
+	function widget($args, $instance) {
+		global $bp;
+
+        $args = apply_filters( 'bp_login_widget_args', $args );
+
+		extract( $args );
+
+		echo $before_widget;
+		echo $before_title
+		   . $widget_name
+		   . $after_title; ?>
+
+		<?php if ( is_user_logged_in() ) : ?>
+
+            <?php do_action( 'bp_before_sidebar_me' ) ?>
+    
+            <div id="sidebar-me">
+                <a href="<?php echo bp_loggedin_user_domain() ?>">
+                    <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
+                </a>
+    
+                <h4><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></h4>
+                <a class="button logout" href="<?php echo wp_logout_url( bp_get_root_domain() ) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>
+    
+                <?php do_action( 'bp_sidebar_me' ) ?>
+            </div>
+    
+            <?php do_action( 'bp_after_sidebar_me' ) ?>
+    
+            <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
+                <?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
+            <?php endif; ?>
+    
+        <?php else : ?>
+    
+            <?php do_action( 'bp_before_sidebar_login_form' ) ?>
+    
+            <p id="login-text">
+                <?php _e( 'To start connecting please log in first.', 'buddypress' ) ?>
+                <?php if ( bp_get_signup_allowed() ) : ?>
+                    <?php printf( __( ' You can also <a href="%s" title="Create an account">create an account</a>.', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
+                <?php endif; ?>
+            </p>
+    
+            <form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
+                <label><?php _e( 'Username', 'buddypress' ) ?><br />
+                <input type="text" name="log" id="sidebar-user-login" class="input" /></label>
+    
+                <label><?php _e( 'Password', 'buddypress' ) ?><br />
+                <input type="password" name="pwd" id="sidebar-user-pass" class="input" /></label>
+    
+                <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
+    
+                <?php do_action( 'bp_sidebar_login_form' ) ?>
+                <input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
+                <input type="hidden" name="testcookie" value="1" />
+            </form>
+    
+            <?php do_action( 'bp_after_sidebar_login_form' ) ?>
+    
+        <?php endif; ?>
+
+		<?php echo $after_widget; ?>
+	<?php
+	}
+
+	function update( $new_instance, $old_instance ) {
+		$instance = $old_instance;
+		
+		return $instance;
+	}
+
+	function form( $instance ) {
+		$instance = wp_parse_args( (array) $instance, array( 'max_members' => 15 ) );
+		$max_members = strip_tags( $instance['max_members'] );
+		?>
+
+		<p><?php _e( 'Login/logout widget for BuddyPress.', 'buddypress' ) ?></p>
+	<?php
+	}
+}
+
+
 /** Widget AJAX ******************/
 
 function bp_core_ajax_widget_members() {
Index: bp-core/bp-core-filters.php
===================================================================
--- bp-core/bp-core-filters.php	(revision 3383)
+++ bp-core/bp-core-filters.php	(working copy)
@@ -247,5 +247,22 @@
 }
 if ( !is_admin() || ( is_admin() && empty( $_POST['noconfirmation'] ) ) )
 	add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 );
+	
+function bp_core_login_widget_cleanup( $args ) {
+    $unset_params = array(
+        'before_widget',
+        'after_widget',
+        'before_title',
+        'after_title',
+        'widget_name'
+    );
+    
+    foreach( $unset_params as $unset_param ) {
+        unset( $args[$unset_param] );
+    }
+    
+    return $args;
+}
+add_filter( 'bp_login_widget_args', 'bp_core_login_widget_cleanup' );
 
 ?>
\ No newline at end of file
