diff --git a/scripts/labtainer-student/README b/scripts/labtainer-student/README
index 73246389..a8022a9e 100644
--- a/scripts/labtainer-student/README
+++ b/scripts/labtainer-student/README
@@ -7,13 +7,13 @@ You may open this pdf by right clicking and select "Open Link".
 This is the Labtainers workspace from which all student
 labs are started using:
 
-    labtainer <labname>
+    labsec start -l <labname>
 
 Leaving out the labname will result in display of a
 list of labs.
 
 Use
-    stoplab <labname>
+    labsec stop -l <labname>
 
 to stop a lab and collect its results.  Note, it is
 good practice to stop labs before transitioning to
@@ -23,4 +23,4 @@ may be networking name conflicts.
 If you wish to restart a lab from scratch, wiping out
 all previous data and work in the lab, use:
 
-    labtainer <labname> -r
+    labsec start -l <labname> -r
diff --git a/scripts/labtainer-student/bin/labutils.py b/scripts/labtainer-student/bin/labutils.py
index 73326859..cd360c18 100644
--- a/scripts/labtainer-student/bin/labutils.py
+++ b/scripts/labtainer-student/bin/labutils.py
@@ -1493,44 +1493,23 @@ def DoStartOne(labname, name, container, start_config, labtainer_config, lab_pat
         results.append(retval)
 
 def GetUserEmail(quiet_start):
+    prev_email = getLastEmail()
+    if prev_email is not None:
+        return prev_email
     user_email = None
     while user_email is None:
-        done = True
         # Prompt user for e-mail address
-        eprompt = '\nPlease enter your e-mail address: '
-        prev_email = getLastEmail()
-        if prev_email is not None:
-            eprompt = eprompt+" [%s]" % prev_email
-
-             #checks if quiet_start is true
-        if quiet_start and prev_email is not None:
-            user_email = prev_email
+        eprompt = '\nPlease enter your Duke unique ID: '
+        if sys.version_info >=(3,0):
+            user_input = input(eprompt)
         else:
-            if sys.version_info >=(3,0):
-                user_input = input(eprompt)
-            else:
-                user_input = raw_input(eprompt)
-            if not all(c in string.printable for c in user_input):
-                print('Bad characters detected.  Please re-enter email')
-            elif '"' in user_input or "'" in user_input:
-                print('No quotes allowed. Please re-enter email')
-            else:
-                user_email = user_input 
+            user_input = raw_input(eprompt)
+        if user_input is not None and len(user_input.strip()) > 0 and user_input.isnumeric():
+            user_email = user_input
+        else:
+            print('Duke unique ID should be a number. Please re-enter')
         if user_email is not None:
-            #user_email = input(eprompt)
-            if len(user_email.strip()) == 0:
-                if prev_email is None:
-                    print('You have provided an empty email address, which may cause your results to not be graded.')
-                    if sys.version_info >=(3,0):
-                        confirm = str(input('Use the empty address? (y/n)')).lower().strip()
-                    else:
-                        confirm = str(raw_input('Use the empty address? (y/n)')).lower().strip()
-                    if confirm != 'y':
-                        user_email = None
-                else:
-                    user_email = prev_email
-            else:
-                putLastEmail(user_email)
+            putLastEmail(user_email)
     return user_email
 
 def CheckLabContainerApps(start_config, lab_path, apps2start):
@@ -1677,8 +1656,9 @@ def ContainerTerminals(lab_path, start_config, container, terminal_count, termin
                 terminal_location, columns, lines = terminalCounter(terminal_count)
                 #sys.stderr.write("%s \n" % terminal_location)
                 #sys.stderr.write("%s \n" % mycontainer_name)
-                cmd = 'bash -l -c bash' 
-                #spawn_command = "gnome-terminal %s -x docker exec -it %s bash -l &" % (terminal_location, mycontainer_name)
+                cmd = 'bash -l -c bash'
+                terminal_path = GetTerminalPath()
+                #spawn_command = "%s %s -x docker exec -it %s bash -l &" % (terminal_path, terminal_location, mycontainer_name)
                 if container.terminal_group is not None:
                     if container.terminal_group not in terminal_groups:
                         terminal_count += 1
@@ -1687,7 +1667,7 @@ def ContainerTerminals(lab_path, start_config, container, terminal_count, termin
                     terminal_groups[container.terminal_group].append(group_command)
                 else:
                     terminal_count += 1
-                    spawn_command = 'gnome-terminal %s --profile=labtainers -- docker exec -it --env COLUMNS=%d --env LINES=%d %s %s >/dev/null 2>&1 &' % (terminal_location,
+                    spawn_command = '%s %s --profile=labtainers -- docker exec -it --env COLUMNS=%d --env LINES=%d %s %s >/dev/null 2>&1 &' % (terminal_path, terminal_location,
                        columns, lines, mycontainer_name, cmd)
                     logger.debug("gnome spawn: %s" % spawn_command)
                     #print spawn_command
@@ -1778,7 +1758,8 @@ def DoTerminals(start_config, lab_path, run_container=None, servers=None, contai
             #tab_commands = tab_commands+' --tab %s --' % command
         terminal_location, columns, lines = terminalCounter(terminal_count)
         terminal_count += 1
-        spawn_command = 'gnome-terminal %s --profile=labtainers %s >/dev/null 2>&1' % (terminal_location, tab_commands)
+        terminal_path = GetTerminalPath()
+        spawn_command = '%s %s --profile=labtainers %s >/dev/null 2>&1' % (terminal_path, terminal_location, tab_commands)
         FNULL = open(os.devnull, 'w')
         result = subprocess.Popen(shlex.split(spawn_command), close_fds=True, stdout=FNULL, stderr=subprocess.STDOUT)
         logger.debug("gnome spawn tg: %s" % spawn_command)
@@ -1901,6 +1882,21 @@ def DoStart(start_config, labtainer_config, lab_path,
     dockerPull.clearLine()
     sys.stdout.write(progress)
 
+    # Connect to labsec to proceed
+    with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as unix_client:
+        try:
+            unix_client.connect("/tmp/.labsec.sock")
+            unix_client.send(str.encode(student_email))
+            message = unix_client.recv(1024)
+            if message != b'ok':
+                logger.error('\nInvalid Duke unique ID. Please execute the following command, and restart this lab with the "-r" option:\n$ rm ~/.local/share/labtainers/email.txt')
+                sys.exit(1)
+        except SystemExit:
+            sys.exit(1)
+        except:
+            logger.error('\nAn error occurred in labsec. Make sure to start lab with `labsec` command. If the problem persists, please contact TA for help')
+            sys.exit(1)
+
     if False in results:
         DoStop(start_config, labtainer_config, lab_path, False, run_container, servers)
         logger.error('DoStartOne has at least one failure!')
@@ -2634,7 +2630,7 @@ def SynchStop(start_config, run_container=None):
             t.join()
             logger.debug('joined %s' % t.getName())
 
-def GatherZips(zip_file_list, labtainer_config, start_config, labname, lab_path):
+def GatherZips(zip_file_list, labtainer_config, start_config, labname, lab_path, from_stoplab=False):
     mycwd = os.getcwd()
     if len(zip_file_list) == 0:
         logger.error('GatherZips called without any zips')
@@ -2721,8 +2717,24 @@ def GatherZips(zip_file_list, labtainer_config, start_config, labname, lab_path)
          os.system(cmd)
     os.chdir(mycwd)
 
+    if from_stoplab:
+        # Connect to labsec to proceed
+        with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as unix_client:
+            try:
+                unix_client.connect("/tmp/.labsec.sock")
+                unix_client.send(str.encode(combinedZipFilename))
+                message = unix_client.recv(1024)
+                if message != b'ok':
+                    logger.error('\nLabsec failed')
+                    sys.exit(1)
+            except SystemExit:
+                sys.exit(1)
+            except:
+                logger.error('\nAn error occurred in labsec. Make sure to stop the lab with `labsec` command. If you have already stopped the lab with `stoplab` command, please restart the lab (without `-r` option) and stop it again with `labsec` command. If the problem persists, please contact TA for help')
+                sys.exit(1)
+
 
-def DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False):
+def DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False, from_stoplab=False):
     retval = True
     labname = os.path.basename(lab_path)
     logger.debug("DoStop Multiple Containers and/or multi-home networking, keep_running is %r" % keep_running)
@@ -2766,13 +2778,13 @@ def DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_cont
     if zip_file_list[0].startswith('.'):
         logger.error('Missing email for student, cannot gather artifacts')
         return None
-    GatherZips(zip_file_list, labtainer_config, start_config, labname, lab_path)
+    GatherZips(zip_file_list, labtainer_config, start_config, labname, lab_path, from_stoplab=from_stoplab)
     return retval
 
 # ignore_stop_error - set to 'False' : do not ignore error
 # ignore_stop_error - set to 'True' : ignore certain error encountered since it might not even be an error
 #                                     such as error encountered when trying to stop non-existent container
-def StopLab(lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False):
+def StopLab(lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False, from_stoplab=False):
     labname = os.path.basename(lab_path)
     if labname.endswith('labtainer.grader'):
         return None 
@@ -2788,7 +2800,7 @@ def StopLab(lab_path, ignore_stop_error, run_container=None, servers=None, clone
     CreateHostHomeXfer(host_xfer_dir)
 
     if DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_container=run_container, 
-              servers=servers, clone_count=clone_count, keep_running=keep_running):
+              servers=servers, clone_count=clone_count, keep_running=keep_running, from_stoplab=from_stoplab):
         # Inform user where results are stored
         print("Results stored in directory: %s" % host_xfer_dir)
         syncdir = os.path.join(os.getenv('LABTAINER_DIR'), 'scripts','labtainer-student', '.tmp', labname, 'sync')
@@ -2831,7 +2843,8 @@ def DoMoreterm(lab_path, container_name, clone_num=None, alt_name=None):
         logger.debug("No terminals supported for %s" % container_name)
         return False
     else:
-        spawn_command = "gnome-terminal --profile=labtainers -- docker exec -it %s bash -l -c bash > /dev/null 2>&1 &" % 	mycontainer_name
+        terminal_path = GetTerminalPath()
+        spawn_command = "%s --profile=labtainers -- docker exec -it %s bash -l -c bash > /dev/null 2>&1 &" % (terminal_path, mycontainer_name)
         logger.debug("spawn_command is (%s)" % spawn_command)
         os.system(spawn_command)
     return True
@@ -2942,3 +2955,14 @@ def GetContainerId(image):
             if parts[1].startswith(image):
                return parts[0]
     return None
+
+def GetTerminalPath():
+    terminal_path = os.path.realpath("/etc/alternatives/x-terminal-emulator")
+    if terminal_path.endswith('.wrapper'):
+        terminal_path = terminal_path[:-8]
+    # Fallback options
+    if not os.path.exists(terminal_path):
+        terminal_path = "mate-terminal"
+    if not os.path.exists(terminal_path):
+        terminal_path = "gnome-terminal"
+    return terminal_path
\ No newline at end of file
diff --git a/scripts/labtainer-student/bin/stop.py b/scripts/labtainer-student/bin/stop.py
index 5d38082b..674c6856 100755
--- a/scripts/labtainer-student/bin/stop.py
+++ b/scripts/labtainer-student/bin/stop.py
@@ -79,7 +79,7 @@ def mainXX():
         current_lab = CurrentLab.CurrentLab()
         clone_count = current_lab.get('clone_count')        
         servers = current_lab.get('servers')        
-        labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count)
+        labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count, from_stoplab=True)
         current_lab.clear()
 
     return 0
@@ -97,31 +97,32 @@ def main():
     if len(lablist) == 0:
         print('No labs are running.')
         labutils.logger.debug('No labs are running.')
+        return 1
     else:
         if args.lab == 'all':
             for lab in lablist:
                 lab_path = os.path.join(os.path.abspath('../../labs'), lab)
                 if current_lab_name is not None and lab != current_lab_name:
-                    labutils.StopLab(lab_path, False)
+                    labutils.StopLab(lab_path, False, from_stoplab=True)
                     print('Stopped lab %s, but was not current lab %s.  Servers and clones may not have stopped' % (lab, current_lab_name))
                     labutils.logger.debug('Stopped lab %s, but was not current lab.  Servers and clones may not have stopped')
                 else:
-                    labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count)
+                    labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count, from_stoplab=True)
                     current_lab.clear()
         else:
             if args.lab in lablist: 
                 lab_path = os.path.join(os.path.abspath('../../labs'), args.lab)
                 if args.lab == current_lab_name:
-                    labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count)
+                    labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count, from_stoplab=True)
                     current_lab.clear()
                 else:
-                    labutils.StopLab(lab_path, False)
+                    labutils.StopLab(lab_path, False, from_stoplab=True)
                     print('Stopped lab %s, but was not current lab.  Servers and clones may not have stopped' % args.lab)
                     labutils.logger.debug('Stopped lab %s, but was not current lab.  Servers and clones may not have stopped' % args.lab)
             else:
                 print('Lab %s is not runnning, however %s is running.' % (args.lab, lablist[0]))
                 labutils.logger.debug('Lab %s is not runnning, however %s is running.' % (args.lab, lablist[0]))
-
+                return 1
     return 0
 
 if __name__ == '__main__':
diff --git a/setup_scripts/install-docker-ubuntu.sh b/setup_scripts/install-docker-ubuntu.sh
index 8536cd82..ee147dd7 100755
--- a/setup_scripts/install-docker-ubuntu.sh
+++ b/setup_scripts/install-docker-ubuntu.sh
@@ -24,9 +24,8 @@ END
 #
 
 #Check if current user is user login. (Targeted to avoid adding root user into docker group instead of the the user logged in account.)
-currUser=`who | awk '{print $1}'`
-if [ "$USER" != "$currUser" ]; then
-    echo "You are not the login user. If you are root user, please exit. And run this script again."
+if [ "$USER" = "root" ]; then
+    echo "You are the root user. Please run this script as a non-root user."
     exit
 fi
 
@@ -44,7 +43,7 @@ if [ $RESULT -ne 0 ];then
 fi
 version=$(lsb_release -a | grep Release: | cut -f 2)
 docker_package=docker-ce
-if [[ $version != 18.* ]]; then
+if [[ $version != 20.* ]]; then
    #---adds docker<92>s official GPG key
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 
@@ -57,7 +56,7 @@ if [[ $version != 18.* ]]; then
    sudo apt-get -y install docker-ce
 else
    docker_package=docker.io
-   echo "Installing docker.io for version 18 of Ubuntu"
+   echo "Installing docker.io for version 20 of Ubuntu"
    sudo apt-get update
    sudo apt-get -y install docker.io
 fi
diff --git a/setup_scripts/update-add.sh b/setup_scripts/update-add.sh
index 4d293b83..7a17d03c 100755
--- a/setup_scripts/update-add.sh
+++ b/setup_scripts/update-add.sh
@@ -3,7 +3,7 @@
 # before the script is sourced from the update-labtainer.sh script.
 #
 if [ -z "$LABTAINER_DIR" ] || [ ! -d "$LABTAINER_DIR" ]; then
-    export LABTAINER_DIR=/home/student/labtainer/trunk
+    export LABTAINER_DIR=/home/$USER/labtainer/trunk
 fi
 hascommit=$(grep "^Commit:" labtainer/trunk/README.md)
 hasgit=$(grep "github.*releases" labtainer/update-labtainer.sh)
diff --git a/setup_scripts/update-ubuntu.sh b/setup_scripts/update-ubuntu.sh
index fcc79c24..0d800ad7 100644
--- a/setup_scripts/update-ubuntu.sh
+++ b/setup_scripts/update-ubuntu.sh
@@ -18,7 +18,7 @@ if [ -z "$haspip3" ]; then
         sudo apt-get install -y python3-pip
     fi
 fi
-hasdocker=$(pip3 list --format=legacy | grep docker)
+hasdocker=$(pip3 list --format=columns | grep docker)
 if [ -z "$hasdocker" ]; then
     echo "Need to install docker python module, will sudo pip3"
     if [ $USER == student ]; then
