diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index f0a88828d99fe27434ecd6391c61fc027d7c1391..a0017b5cf6f32bf44e9ffce29546789dcc8a436f 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -126,14 +126,98 @@ class TicketsAjaxAPI extends AjaxController {
 
         global $thisstaff;
 
+        if(!$thisstaff || !($ticket=Ticket::lookup($tid)) || !$ticket->checkStaffAccess($thisstaff))
+            Http::response(404, 'No such ticket');
 
-        $ticket = new Ticket($tid);
+        $staff=$ticket->getStaff();
+        $lock=$ticket->getLock();
+        $error=$msg=$warn=null;
 
-        $resp = sprintf(
-                '<div style="width:500px;">
-                 <strong>Ticket #%d Preview</strong><br>INFO HERE!!',
-                 $ticket->getExtId());
+        if($lock && $lock->getStaffId()==$thisstaff->getId())
+            $warn.='&nbsp;<span class="Icon lockedTicket">Ticket is locked by '.$lock->getStaffName().'</span>';
+        elseif($ticket->isOverdue())
+            $warn.='&nbsp;<span class="Icon overdueTicket">Marked overdue!</span>';
+       
+        ob_start();
+        echo sprintf(
+                '<div style="width:500px; padding: 2px 2px 0 5px;">
+                 <h2>%s</h2><br>',Format::htmlchars($ticket->getSubject()));
+
+        if($error)
+            echo sprintf('<div id="msg_error">%s</div>',$error);
+        elseif($msg)
+            echo sprintf('<div id="msg_notice">%s</div>',$msg);
+        elseif($warn)
+            echo sprintf('<div id="msg_warning">%s</div>',$warn);
+
+        echo '<table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">';
+
+        $ticket_state=sprintf('<span>%s</span>',ucfirst($ticket->getStatus()));
+        if($ticket->isOpen()) {
+            if($ticket->isOverdue())
+                $ticket_state.=' &mdash; <span>Overdue</span>';
+            else
+                $ticket_state.=sprintf(' &mdash; <span>%s</span>',$ticket->getPriority());
+        }
+
+        echo sprintf('
+                <tr>
+                    <th width="100">Ticket State:</th>
+                    <td>%s</td>
+                </tr>
+                <tr>
+                    <th>Create Date:</th>
+                    <td>%s</td>
+                </tr>',$ticket_state,
+                Format::db_datetime($ticket->getCreateDate()));
+        if($ticket->isClosed()) {
+            echo sprintf('
+                    <tr>
+                        <th>Close Date:</th>
+                        <td>%s   <span class="faded">by %s</span></td>
+                    </tr>',
+                    Format::db_datetime($ticket->getCloseDate()),
+                    ($staff?$staff->getName():'staff')
+                    );
+        } elseif($ticket->getDueDate()) {
+            echo sprintf('
+                    <tr>
+                        <th>Due Date:</th>
+                        <td>%s</td>
+                    </tr>',
+                    Format::db_datetime($ticket->getDueDate()));
+        }
+        echo '</table>';
 
+
+        echo '<hr>
+            <table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">';
+        if($ticket->isOpen()) {
+            echo sprintf('
+                    <tr>
+                        <th width="100">Assigned To:</th>
+                        <td>%s</td>
+                    </tr>',$ticket->isAssigned()?$ticket->getAssignee():' <span class="faded">&mdash; Unassigned &mdash;</span>');
+        }
+        echo sprintf(
+            '   <tr>
+                    <th width="100">Department:</th>
+                    <td>%s</td>
+                </tr>
+                <tr>
+                    <th>Help Topic:</th>
+                    <td>%s</td>
+                </tr>
+                <tr>
+                    <th>From:</th>
+                    <td>%s <span class="faded">%s</span></td>
+                </tr>',
+            Format::htmlchars($ticket->getDeptName()),
+            Format::htmlchars($ticket->getHelpTopic()),
+            Format::htmlchars($ticket->getName()),
+            $ticket->getEmail());
+        echo '
+            </table>';
         $options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
         if($ticket->getNumNotes())
             $options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes");
@@ -150,15 +234,15 @@ class TicketsAjaxAPI extends AjaxController {
         $options[]=array('action'=>'Post Note','url'=>"tickets.php?id=$tid#note");
 
         if($options) {
-            $resp.='<ul class="tip_menu">';
-            foreach($options as $option) {
-                $resp.=sprintf('<li><a href="%s">%s</a></li>',
-                        $option['url'],$option['action']);
-            }
-            $resp.='</ul>';
+            echo '<ul class="tip_menu">';
+            foreach($options as $option)
+                echo sprintf('<li><a href="%s">%s</a></li>',$option['url'],$option['action']);
+            echo '</ul>';
         }
 
-        $resp.='</div>';
+        echo '</div>';
+        $resp = ob_get_contents();
+        ob_end_clean();
 
         return $resp;
     }
diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php
index d2b94d5516e30ae4e447d328f72f468455ca3b17..4f2364e1ae9fa21a0e79135ae5580fcaffdbcb63 100644
--- a/include/staff/login.tpl.php
+++ b/include/staff/login.tpl.php
@@ -1,26 +1,27 @@
 <?php defined('OSTSCPINC') or die('Invalid path'); ?>
+<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>osTicket:: SCP Login</title>
-<link rel="stylesheet" href="css/login.css" type="text/css" />
-<meta name="robots" content="noindex" />
-<meta http-equiv="cache-control" content="no-cache" />
-<meta http-equiv="pragma" content="no-cache" />
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>osTicket:: SCP Login</title>
+    <link rel="stylesheet" href="css/login.css" type="text/css" />
+    <meta name="robots" content="noindex" />
+    <meta http-equiv="cache-control" content="no-cache" />
+    <meta http-equiv="pragma" content="no-cache" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
 </head>
 <body id="loginBody">
 <div id="loginBox">
-	<h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1>
-	<h1><?php echo Format::htmlchars($msg); ?></h1>
-	<br />
-	<form action="login.php" method="post">
-	<input type="hidden" name=do value="scplogin" />
-    <table border=0 align="center">
-        <tr><td width=100px align="right"><b>Username</b>:</td><td><input type="text" name="username" id="name" value="" /></td></tr>
-        <tr><td align="right"><b>Password</b>:</td><td><input type="password" name="passwd" id="pass" /></td></tr>
-        <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<input class="submit" type="submit" name="submit" value="Login" /></td></tr>
-    </table>
-</form>
+    <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1>
+    <h3><?php echo Format::htmlchars($msg); ?></h3>
+    <form action="login.php" method="post">
+        <input type="hidden" name="d"o value="scplogin">
+        <fieldset>
+            <input type="text" name="username" id="name" value="" placeholder="username" autocorrect="off" autocapitalize="off">
+            <input type="password" name="passwd" id="pass" placeholder="password" autocorrect="off" autocapitalize="off">
+        </fieldset>
+        <input class="submit" type="submit" name="submit" value="Log In">
+    </form>
 </div>
 <div id="copyRights">Copyright &copy; <a href='http://www.osticket.com' target="_blank">osTicket.com</a></div>
 </body>
diff --git a/scp/css/login.css b/scp/css/login.css
index 8516ea0e06cdf7f6a755a1cf31504da350f1df36..a15d4d12e5b0aec8970d802e0095ad53be00620f 100644
--- a/scp/css/login.css
+++ b/scp/css/login.css
@@ -1,88 +1,138 @@
+* {
+    box-sizing: border-box;
+    position: relative;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+}
+
+*:focus {
+    outline-color: rgb(207,16,118);
+    outline-style: auto;
+    outline-width: 5px;
+    z-index:1000;
+}
+
+:-webkit-input-placeholder {
+    color:#888;
+    font-style:italic;
+}
+
+:-moz-placeholder {
+    color:#888;
+    font-style:italic;
+}
+
+html {
+    height:100%;
+    font-size: 100%;
+    overflow-y: scroll;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+}
+
 body {
-	background:url(/images/bg.gif) #fff;
-	font-family:arial, helvetica, sans-serif;
-	font-size:10pt;
-	color:#000;
-}
-body#loginBody {
-	text-align: center;
-	margin: 100px;
-}
-h1#logo {
-    float: none;
-    width: 190px;
-    height: 60px;
-    padding:10px 0 20px 0;
-    background: url(../images/logo-support.gif) center center no-repeat #fff;
-    margin: 0 auto 0 auto;
-}
-h1#logo a, h1#logo a:link, h1#logo a:visited, h1#logo a:hover {
-    display: block;
-    width: 190px;
-    height: 60px;
-    text-indent: -999em;
-    text-decoration: none;
-    background: none;
-    margin:0 auto 0 auto;
-}
-
-input:focus, textarea:focus {
-    color: #F70;
-    background: #FEA;
-    -moz-outline-style: none;
-}
-
-input[type="hidden"] { border: 0; }
-
-.submit {
-    font-family: Arial, Helvetica, sans-serif;
- 		margin:10px auto 10px auto;
-    text-shadow: #333 -1px -1px 0px;
-    background-color: #DB8606;
-    color: #FFF;
-    border:1px solid #666;
-    font-weight:bold;
-    width:auto;
+    -webkit-font-smoothing:antialiased;
+    background:url(../images/login-background.jpg) top left repeat-x #fff;
+    font-size: 16px;
+    font-smoothing:antialiased;
+    height:100%;
+    line-height: 1.5em;
+    margin: 0;
+    text-align: center;
 }
 
-input[type="submit"]:focus {
-    border: 1px solid #E50;
-    border-right-color: #FBA;
-    border-bottom-color: #FBA;
-    background: #F70;
-    color: #FEA;
+body, input {
+    font-family: helvetica, arial, sans-serif;
+    font-size: 100%/1.5;
+    color: #000;
 }
 
-h1 { font-size: 0.9em; color: #F70; margin: 0; text-align: center;}
+input[type=reset], input[type=submit], input[type=button] {
+    display: inline-block;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+    -moz-tap-highlight-color: rgba(0, 0, 0, 0);
+    -o-tap-highlight-color: rgba(0, 0, 0, 0);
+    tap-highlight-color: rgba(0, 0, 0, 0);
+}
 
+#loginBox {
+    border:1px solid #2a67ac;
+    border-right:2px solid #2a67ac;
+    border-bottom:3px solid #2a67ac;
+    background:#fff;
+    width:400px;
+    margin:10% auto 0 auto;
+    padding:1em;
+    text-align:center;
+}
 
-div#loginBox {
-	width: 300px;
-	padding: 10px 20px 5px 20px;
-	margin: 0 auto 0 auto;
-	background: #fff;
-	text-align: center;
-	border:5px solid #ddd;
+h1 {
+    margin:0;
 }
-div#copyRights {
-	font-size: 0.8em;
-	text-align: center;
-    color:#666;
+
+#logo a {
+    display:block;
+    width:180px;
+    height:72px;
+    text-decoration:none;
+    text-indent:-9999px;
+    background:url(../images/login-logo.png);
+    margin:0 auto 1em auto;
 }
 
-#copyRights a, #copyRights a:link, #copyRights a:visited, #copyRights a:hover {
+h3 {
+    margin:1em 0;
+    text-align:center;
+    font-size:0.8em;
+    font-weight:normal;
+    color:#d00;
+}
 
-    text-decoration: none;
-    background: none;
-    color:#666;
+form {
+    width:220px;
+    margin:0 auto;
+    overflow:hidden;
 }
 
+fieldset {
+    border:none;
+    margin:0;
+    padding:0;
+}
 
-input { 
-	width: 175px;
-    margin-left: 5px
+fieldset input {
+    display:block;
+    width:100%;
+    margin-bottom:1em;
+    border:1px solid #ccc;
+    background:#fff;
+    padding:2px;
 }
-input[type="submit"] { width: auto; margin:10px auto 10px auto; }
 
+input.submit {
+    display:inline-block;
+    float:right;
+    margin:0;
+    height:24px;
+    line-height:24px;
+    font-weight:bold;
+    border:1px solid #666666;
+    padding:0 10px;
+    background: url('../images/grey_btn_bg.png?1312910883') top left repeat-x;
+    color: #333;
+}
 
-table,form { margin-top:2px; padding: 0; }
+input.submit:hover, input.submit:active {
+    background-position:bottom left;
+}
+
+#copyRights {
+    font-size:0.7em;
+    color:#888;
+    padding:1em;
+    text-align:center;
+}
+
+#copyRights a {
+    color:#888;
+}
diff --git a/scp/css/scp.css b/scp/css/scp.css
index 85a4712cdca6d4b928694df2555d125831d9a385..4f028c561cf5eb9f0ead3ccc7c179475d431d3e8 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -926,6 +926,16 @@ h2 .reload {
     width:300px;
 }
 
+.tip_content hr {
+        
+    color: #ddd;
+    background-color: #ddd;
+    height: 1px;  
+    border: 0;
+    padding: 0;
+    width: 100%;    
+}
+
 .tip_close {
     position:absolute;
     left:100%;
@@ -950,7 +960,7 @@ h2 .reload {
 .tip_menu {
     margin:10px 0 0 0;
     padding:5px 0;
-    border-top:1px solid #ddd;
+    border-top:1px solid #666;
     height:16px;
     font-size:9pt;
 }
diff --git a/scp/images/grey_btn_bg.png b/scp/images/grey_btn_bg.png
new file mode 100644
index 0000000000000000000000000000000000000000..3b7fca9d3c41fcefd6ca49d6aa98ea3fc3fe1a41
Binary files /dev/null and b/scp/images/grey_btn_bg.png differ
diff --git a/scp/images/login-background.jpg b/scp/images/login-background.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..eebfa40b8f24cf1a088e6d4eb1a6b279e958ad7c
Binary files /dev/null and b/scp/images/login-background.jpg differ
diff --git a/scp/images/login-logo.png b/scp/images/login-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..6526ebe0a15f393382e0339b38cef8422d7ff471
Binary files /dev/null and b/scp/images/login-logo.png differ
diff --git a/setup/inc/header.inc.php b/setup/inc/header.inc.php
index 977050bc58441041b3036386aa634b804e568d6c..4c7d16e0f217da5cce7e5db5ee779964c2b9dc2e 100644
--- a/setup/inc/header.inc.php
+++ b/setup/inc/header.inc.php
@@ -1,6 +1,9 @@
-<!DOCTYPE html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">
+<html>
 <head>
     <title><?php echo $wizard['title']; ?></title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <link rel="stylesheet" href="css/wizard.css">
     <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
     <script type="text/javascript" src="js/tips.js"></script>
diff --git a/setup/inc/install.inc.php b/setup/inc/install.inc.php
index 5daefe123386f17458fe8afacf63d570b77cdca1..7f050baef479582a393d41e452b0adb3e42b4b8b 100644
--- a/setup/inc/install.inc.php
+++ b/setup/inc/install.inc.php
@@ -1,12 +1,6 @@
 <?php 
 if(!defined('SETUPINC')) die('Kwaheri!');
 $info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbhost'=>'localhost');
-
-//XXX: Remove b4 release.
-if($_SESSION['installer']['info'] && !$_POST)
-    $info=$_SESSION['installer']['info'];
-
-
 ?>
 <div id="main" class="step2">        
     <h1>osTicket Basic Installation</h1>
diff --git a/setup/inc/upgrade-attachments.inc.php b/setup/inc/upgrade-attachments.inc.php
index 1a69526454fa6e695b6d50c3f9b305acafd110d8..c8155d32c672e358cb068d79720a076327a88706 100644
--- a/setup/inc/upgrade-attachments.inc.php
+++ b/setup/inc/upgrade-attachments.inc.php
@@ -1,6 +1,6 @@
 <?php
 if(!defined('SETUPINC')) die('Kwaheri!');
-$msg = $_SESSION['upgrader']['msg'];
+$msg = $_SESSION['ost_upgrader']['msg'];
 ?>    
 <div id="main">
     <h1>Attachments Migration</h1>
diff --git a/setup/install.php b/setup/install.php
index e7f68e9d5f203e3a6960fdb229449a48682021ea..27b1388933d03ef9c0db5690dd147213848d750f 100644
--- a/setup/install.php
+++ b/setup/install.php
@@ -29,11 +29,11 @@ $wizard['menu']=array('Installation Guide'=>'http://osticket.com/wiki/Installati
 
 if($_POST && $_POST['s']) {
     $errors = array();
-    $_SESSION['installer']['s']=$_POST['s'];
+    $_SESSION['ost_installer']['s']=$_POST['s'];
     switch(strtolower($_POST['s'])) {
         case 'prereq':
             if($installer->check_prereq())
-                $_SESSION['installer']['s']='config';
+                $_SESSION['ost_installer']['s']='config';
             else
                 $errors['prereq']='Minimum requirements not met!';
             break;
@@ -43,7 +43,7 @@ if($_POST && $_POST['s']) {
             elseif(!$installer->config_writable())
                 $errors['err']='Write access required to continue';
             else
-                $_SESSION['installer']['s']='install';
+                $_SESSION['ost_installer']['s']='install';
             break;
         case 'install':
             if($installer->install($_POST)) {
@@ -51,7 +51,7 @@ if($_POST && $_POST['s']) {
                                         'email' =>$_POST['admin_email'],
                                         'URL'=>URL);
                 //TODO: Go to subscribe step.
-                $_SESSION['installer']['s']='done';
+                $_SESSION['ost_installer']['s']='done';
             } elseif(!($errors=$installer->getErrors()) || !$errors['err']) {
                 $errors['err']='Error installing osTicket - correct the errors below and try again.';
             }
@@ -69,16 +69,16 @@ if($_POST && $_POST['s']) {
                 $errors['notify'] = 'Check one or more';
 
             if(!$errors)
-                $_SESSION['installer']['s'] = 'done';
+                $_SESSION['ost_installer']['s'] = 'done';
             break;
     }
 
-}elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['installer']['s']=='subscribe') {
-    $_SESSION['installer']['s']='done';
+}elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['ost_installer']['s']=='subscribe') {
+    $_SESSION['ost_installer']['s']='done';
 }
 
 
-switch(strtolower($_SESSION['installer']['s'])) {
+switch(strtolower($_SESSION['ost_installer']['s'])) {
     case 'config':
     case 'install':
         if(!$installer->config_exists()) {
diff --git a/setup/setup.inc.php b/setup/setup.inc.php
index 7fc66597717bbcf4ef7a092b25329d2460e1ece4..f2af40af61e1b7e94b9ae915eb1e81e103560594 100644
--- a/setup/setup.inc.php
+++ b/setup/setup.inc.php
@@ -15,13 +15,21 @@
 **********************************************************************/
 
 #inits
-error_reporting(E_ALL ^ E_NOTICE); //turn on errors
+error_reporting(E_ALL ^ E_NOTICE); //turn on errors??
 ini_set('magic_quotes_gpc', 0);
 ini_set('session.use_trans_sid', 0);
 ini_set('session.cache_limiter', 'nocache');
 ini_set('display_errors',1); //We want the user to see errors during install process.
 ini_set('display_startup_errors',1);
 
+#Disable Globals if enabled
+if(ini_get('register_globals')) {
+    ini_set('register_globals',0);
+    foreach($_REQUEST as $key=>$val)
+        if(isset($$key))
+            unset($$key);
+}
+
 #start session
 session_start();