Index: wp-admin/includes/user.php
===================================================================
--- wp-admin/includes/user.php	(revision 41860)
+++ wp-admin/includes/user.php	(working copy)
@@ -39,7 +39,7 @@
 		$update = false;
 	}
 
-	if ( !$update && isset( $_POST['user_login'] ) )
+	if ( isset( $_POST['user_login'] ) )
 		$user->user_login = sanitize_user($_POST['user_login'], true);
 
 	$pass1 = $pass2 = '';
Index: wp-admin/user-edit.php
===================================================================
--- wp-admin/user-edit.php	(revision 41860)
+++ wp-admin/user-edit.php	(working copy)
@@ -368,7 +368,7 @@
 <table class="form-table">
 	<tr class="user-user-login-wrap">
 		<th><label for="user_login"><?php _e('Username'); ?></label></th>
-		<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr($profileuser->user_login); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e('Usernames cannot be changed.'); ?></span></td>
+		<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr($profileuser->user_login); ?>" class="regular-text" <?php echo (current_user_can( 'edit_users')) ? '' : 'disabled'; ?>/></td>
 	</tr>
 
 <?php if ( !IS_PROFILE_PAGE && !is_network_admin() ) : ?>
Index: wp-includes/user.php
===================================================================
--- wp-includes/user.php	(revision 41860)
+++ wp-includes/user.php	(working copy)
@@ -1481,10 +1481,18 @@
 	} elseif ( mb_strlen( $user_login ) > 60 ) {
 		return new WP_Error( 'user_login_too_long', __( 'Username may not be longer than 60 characters.' ) );
 	}
-
-	if ( ! $update && username_exists( $user_login ) ) {
+	/*
+	 * If there is no update, just check for `username_exists`. If there is an update,
+	 * check if current email and new email are the same, or not, and check `username_exists`
+	 * accordingly.
+	 */
+	if ( ( ! $update || ( ! empty( $old_user_data ) && 0 !== strcasecmp( $user_login, $old_user_data->user_login ) ) )
+		&& ! defined( 'WP_IMPORTING' )
+		&& username_exists( $user_login )
+	) {
 		return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
 	}
+	
 
 	/**
 	 * Filters the list of blacklisted usernames.
@@ -1500,17 +1508,9 @@
 	}
 
 	/*
-	 * If a nicename is provided, remove unsafe user characters before using it.
-	 * Otherwise build a nicename from the user_login.
+	 * Evertime build a nicename from the user_login.
 	 */
-	if ( ! empty( $userdata['user_nicename'] ) ) {
-		$user_nicename = sanitize_user( $userdata['user_nicename'], true );
-		if ( mb_strlen( $user_nicename ) > 50 ) {
-			return new WP_Error( 'user_nicename_too_long', __( 'Nicename may not be longer than 50 characters.' ) );
-		}
-	} else {
-		$user_nicename = mb_substr( $user_login, 0, 50 );
-	}
+	$user_nicename = mb_substr( $user_login, 0, 50 );
 
 	$user_nicename = sanitize_title( $user_nicename );
 
@@ -1662,9 +1662,9 @@
 
 	$compacted = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' );
 	$data = wp_unslash( $compacted );
-
-	if ( ! $update ) {
-		$data = $data + compact( 'user_login' );
+	
+	if(current_user_can( 'edit_users')){
+		$data = $data + compact( 'user_login');
 	}
 
 	/**
@@ -1861,6 +1861,7 @@
 
 	// Merge old and new fields with new fields overwriting old ones.
 	$userdata = array_merge( $user, $userdata );
+
 	$user_id = wp_insert_user( $userdata );
 
 	if ( ! is_wp_error( $user_id ) ) {
