I control everyone in multiplayer

I have a problem - I made a multiplayer game, and everything works fine, but when I spawn on the server, and then my friend spawns, then I control both players.
How do I change that, so each player will control himself?
If that helps, have my scripts:

This one is for multiplayer:

using UnityEngine;
using System.Collections;
using System;
 
public class MPBase : MonoBehaviour 
{
 
    public string connectToIp = "127.0.0.1";
    public int connectPort = 25000;
    public bool useNAT = false;
    public string ipaddress = "";
    public string port = "";
 
    string playerName = "<NAME ME>";
 
    void OnGUI()
    {
        if (Network.peerType == NetworkPeerType.Disconnected)
        {
            if (GUILayout.Button("Connect"))
            {
                if (playerName != "<NAME ME>")
                {
                    Network.useNat = useNAT;
                    Network.Connect(connectToIp, connectPort);
                    PlayerPrefs.SetString("playerName", playerName);
                }
            }
 
        if (GUILayout.Button("Start Server"))
        {
            if (playerName != "<NAME ME>")
            {
                Network.useNat = useNAT;
                Network.InitializeServer(32, connectPort);
 
                foreach (GameObject go in FindObjectsOfType(typeof(GameObject)))
                {
                    go.SendMessage("OnNetworkLoadedLevel", SendMessageOptions.DontRequireReceiver);
                }
                PlayerPrefs.SetString("playerName", playerName);
            }
        }
            playerName = GUILayout.TextField(playerName);
            connectToIp = GUILayout.TextField(connectToIp);
            connectPort = Convert.ToInt32(GUILayout.TextField(connectPort.ToString()));
        }
        else
        {
            if (Network.peerType == NetworkPeerType.Connecting) GUILayout.Label("Connect Status : Connecting");
            else if (Network.peerType == NetworkPeerType.Client)
            {
                GUILayout.Label("Connection Status : Client!");
                GUILayout.Label("Ping to Server: " + Network.GetAveragePing(Network.connections[0]));
            }
 
            else if (Network.peerType == NetworkPeerType.Server)
            {
                GUILayout.Label("Connection Status : Server!");
                GUILayout.Label("Connections: " + Network.connections.Length);
                if (Network.connections.Length >= 1)
                    GUILayout.Label("Ping to Server: " + Network.GetAveragePing(Network.connections[0]));
            }
 
            if (GUILayout.Button("Disconnect"))
                Network.Disconnect(200);
 
            ipaddress = Network.player.ipAddress;
            port = Network.player.port.ToString();
            GUILayout.Label("IP Address: " + ipaddress + ":" + port);
        }
    }
 
    void OnConnectedToServer()
    {
        foreach (GameObject go in FindObjectsOfType(typeof(GameObject)))
        {
            go.SendMessage("OnNetworkLoadedLevel", SendMessageOptions.DontRequireReceiver);
        }
    }
}

This one is for spawning:

#pragma strict

var networkPlayer : GameObject;
var localPlayer : GameObject;

function OnGUI () 
{
	if(GUI.Button(Rect(10,10,60,20),"Spawn"))
	{
		Instantiate(localPlayer, transform.position, transform.rotation);
		Network.Instantiate(networkPlayer, transform.position, transform.rotation, 0);
	}
}

You have to add

if(networkView.isMine)
{
    //do some Movement
}

in your Movementscripts. Besides that you dont have to differentiate between “localPlayer” and “networkPlayer”, because Network.Instantiate will be executed on every connected client/sever buffered.