diff --git a/css/default_style.css b/css/default_style.css
index 85ddefe17a49de1c96ca8db5249e071050b422ae..4305a148bab37b9d4c3cfce21013ac893014a08c 100755
--- a/css/default_style.css
+++ b/css/default_style.css
@@ -15,15 +15,10 @@ body {
 }
 
 input{
-	width: 100%;
+	width: 90%;
 	margin: 1px auto 15px;
 }
 
-input[type="checkbox"]{
-	width: 0;
-	margin-right: 10px;
-}
-
 a:link, a:visited {
 	color: rgb(250,250,250);
 	text-decoration: none;
diff --git a/login/login.html b/login/login.html
index 128184879ea2f8ea88ce9a66e5155321edb1135a..821a4413b7941e38c260acbd9fd8dc9d275a2614 100755
--- a/login/login.html
+++ b/login/login.html
@@ -3,7 +3,7 @@
     <head>
         <title>Login to OneHundred</title>
         <link rel="stylesheet" type="text/css" href="../css/default_style.css">
-            <link rel="stylesheet" type="text/css" href="../css/login.css">
+        <link rel="stylesheet" type="text/css" href="../css/login.css">
     </head>
     <body>
         <div id="login_frame" class="frame">
diff --git a/login/login.php b/login/login.php
index 25c864af5f08c66dfa4335a019212880697cd399..6c740789dd7c28eff14a3cc907d83d194cdff2f5 100755
--- a/login/login.php
+++ b/login/login.php
@@ -26,7 +26,7 @@
                 </script>";
                 header("Location: login.html");
             }
-            mysql_close($conn);
+            mysql_close();
         }
     }
 ?>
diff --git a/login/sign_up.html b/login/sign_up.html
index 33cafb7fe68098ed8cf524c2b0e95e5377ff2017..497590b92fd8804d9a98df6c31f4377b0266c248 100755
--- a/login/sign_up.html
+++ b/login/sign_up.html
@@ -2,7 +2,8 @@
 <html>
 <head>
 	<title>Sign Up</title>
-	<link rel="stylesheet" type="text/css" href="../css/main.css">
+    <link rel="stylesheet" type="text/css" href="../css/default_style.css">
+    <link rel="stylesheet" type="text/css" href="../css/login.css">
 </head>
 <body>
 	<div id="sign_up_frame" class="frame">
@@ -12,11 +13,11 @@
             <p id="error_signup" style="text-align: center;"></p>
 			<form name="sign_up" method="post" action="sign_up.php" onsubmit="return validate_password();">
 				Your name*
-				<input type="text" name="full_name"><br/>
+				<input type="text" name="full_name">
 				Username*
-				<input type="text" name="user_name"><br/>
+				<input type="text" name="username" onkeyup="checkAvailability(this.name,this.value)"><label id="username_verification"></label></br>
 				Email*
-				<input type="Email" name="user_email"><br/>
+				<input type="Email" name="user_email"onkeyup="checkAvailability(this.name,this.value)"><label id="email_verification"></label></br>
 				Password*
 				<input type="Password" name="user_password"><br/>
 				Confirm password*
@@ -25,7 +26,7 @@
 				<input type="text" name="user_phone"><br/>
 
                 <input type="button" value="Sign me up as driver" id="signAs_driver" style="width : 40%" onclick= "driver_signup();"><label id="driversign_status"><br></label>
-                <input type="text" name="is_driver" style="display:none">
+                    <input type="text" name="is_driver" value="No" style="display:none">
 				<input type="submit" value="REGISTER">
 			</form>
             <p><br>* Required field</p>
@@ -48,6 +49,27 @@
         document.getElementById("signAs_driver").style.display = "none";
         document.sign_up.is_driver.value = "Yes";
     }
+    function checkAvailability(name,value)
+    {
+        xhttp = new XMLHttpRequest();
+        if (value.length == 0) {
+            document.getElementById("username_verification").innerHTML = "";
+            document.getElementById("email_verification").innerHTML = "";
+            return;
+        }
+        xhttp.onreadystatechange = function() {
+            if (this.readyState == 4 && this.status == 200) {
+                if (name === "username") {
+                    document.getElementById("username_verification").innerHTML = this.responseText;
+                } else if (name === "user_email") {
+                    document.getElementById("email_verification").innerHTML = this.responseText;
+                }
+            }
+        };
+        var str = name+"="+value;
+        xhttp.open("GET", "sign_up.php?key="+str, true);
+        xhttp.send();
+    }
     </script>
 
 </body>
diff --git a/login/sign_up.php b/login/sign_up.php
index 6b972d104df7722fc42d3b98651fa5209e58d416..f4dd99b4390a800df57a3632c1d502dbec629e33 100644
--- a/login/sign_up.php
+++ b/login/sign_up.php
@@ -1,7 +1,7 @@
 <?php
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         if (!empty($_POST['full_name']) &&
-            !empty($_POST['user_name']) &&
+            !empty($_POST['username']) &&
             !empty($_POST['user_email']) &&
             !empty($_POST['user_password']) &&
             !empty($_POST['confirm_password']) &&
@@ -14,7 +14,7 @@
             $password = $_POST['user_password'];
             $phone    = $_POST['user_phone'];
             
-            if(isset($_POST['is_driver']))
+            if($_POST['is_driver'] == "Yes")
             {
                 $status = 'driver';
             }
@@ -26,9 +26,13 @@
             $query = mysql_query("INSERT INTO user (name,email,phone,username,password,status,pict) VALUES ('$fullname', '$email', '$phone', '$username', '$password', '$status',DEFAULT)") or die(mysql_error());
             if($query)
             {
-                header("Location: ../order/order.html");
+                if ($status == "customer") {
+                    header("Location: ../order/order.html");
+                } else {
+                    header("Location: ../profile_page/profile.html");
+                }
             }
-            mysql_close($conn);
+            mysql_close();
         }
         else {
             include("sign_up.html");
@@ -37,5 +41,26 @@
             </script>";
             header("Location: sign_up.html");
         }
+    } else if ($_SERVER["REQUEST_METHOD"] == "GET") {
+        if (!empty($_GET['key'])) {
+            $key = stristr($_GET['key'],'=',true);
+            $value = substr(strstr($_GET['key'],'='),1);
+            
+            include '../database/dbconnect.php';
+            
+            if ($key == "username") {
+                $query = mysql_query("SELECT * FROM user WHERE username='".$value."'") or die(mysql_error());
+                $numrows=mysql_num_rows($query);
+            } else if ($key == "user_email") {
+                $query = mysql_query("SELECT * FROM user WHERE email='".$value."'") or die(mysql_error());
+                $numrows=mysql_num_rows($query);
+            }
+            if ($numrows != 0) {
+                echo " X";
+            } else {
+                echo " Ok";
+            }
+            mysql_close();
+        }
     }
 ?>