public String identUser(String message, String oldname, Socket socket){
	userpass = message.substring(10);
	userpassarray = userpass.split(" ");
	//Checks if the name is registered
	if(regnames.containsKey(userpassarray[0])){
	    //Identifies the user
	    if(userpassarray[1].compareTo((regnames.get(userpassarray[0])).toString()) == 0){
		users.remove(oldname);
		ArrayList<String> hold = userroomlist.get(oldname);
		userroomlist.remove(oldname);
		userroomlist.put(userpassarray[0], hold);
		users.put(userpassarray[0], userpassarray[0]);

		//Notifies all rooms the user is in that they have changed their name
		for(int j = 0; j < hold.size(); j++){
		    int roomnum = roomlist.get(hold.get(j));
		    (rooms.get(roomnum-1)).remove(oldname);
		    (rooms.get(roomnum-1)).put(userpassarray[0], outputStreams.get(socket));
		    sendToChannel(oldname + " has changed their name to " + userpassarray[0], roomnum, userpassarray[0], socket, hold.get(j));
		    sendListChannel(roomnum, userpassarray[0], socket, hold.get(j));
		}
		sendToAll(oldname + " has changed their name to " + userpassarray[0]);
		sendListAll();
		return userpassarray[0];
	    }
	    //Checks if the password is correct
	    else{
		try{
		    //Tells the user they entered the wrong password
		    DataOutputStream dout = new DataOutputStream(socket.getOutputStream());
		    dout.writeUTF("The password you entered was incorrect.");
		} catch(IOException ie) {
		    System.out.println(ie);
		}
		return oldname;
	    }
	}
	//The name is not registered
	else if(!regnames.containsKey(userpassarray[0])){
	    try{
                DataOutputStream dout = new DataOutputStream(socket.getOutputStream());
                dout.writeUTF("This name is not registered. Please register this name before authenticating with it.");
            } catch(IOException ie) {
                System.out.println(ie);
            }
	    return oldname;
	}
	return oldname;
    }