incremetnal
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ff0806..e4aa79b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@
 endif()
 
 # general
-option(BUILD_SHARED_LIBS "Build Pion as shared library" OFF)
+option(BUILD_SHARED_LIBS "Build as shared library" OFF)
 option(BUILD_UT "Enable Unit test" OFF)
 
 # Boost
@@ -73,7 +73,21 @@
     ${CMAKE_BINARY_DIR}/generated/webassets.cpp
 )
 
-set_source_files_properties(${GENERATED_SRC_FILES} PROPERTIES GENERATED TRUE)
+if (CMAKE_COMPILER_IS_GNUCC)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+                    OUTPUT_VARIABLE GCC_VERSION)
+    string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
+    list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
+    list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
+
+    message(STATUS ${GCC_MAJOR})
+    message(STATUS ${GCC_MINOR})
+endif()
+
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR GCC_VERSION VERSION_GREATER 5.0)
+    set_source_files_properties(${GENERATED_SRC_FILES} PROPERTIES GENERATED TRUE)
+endif()
 
 set(SRC_FILES
     src/token_authorization_middleware.cpp
@@ -96,25 +110,34 @@
 # this line simply disables the warning, and the compiler does the right thing
 # we selectively only disable this warning on this specific file
 # http://stackoverflow.com/questions/28094263/create-array-of-chars-avoiding-narrowing
-set_source_files_properties(${CMAKE_BINARY_DIR}/generated/webassets.cpp PROPERTIES COMPILE_FLAGS -Wno-c++11-narrowing)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0")
+    set_source_files_properties(${CMAKE_BINARY_DIR}/generated/webassets.cpp PROPERTIES COMPILE_FLAGS -Wno-c++11-narrowing)
+  endif()
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    set_source_files_properties(${CMAKE_BINARY_DIR}/generated/webassets.cpp PROPERTIES COMPILE_FLAGS -Wno-c++11-narrowing)
+endif()
 
 # big list of naughty strings
 file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/generated")
 add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/generated/blns.hpp
     COMMAND xxd -i ${CMAKE_CURRENT_SOURCE_DIR}/src/blns.txt ${CMAKE_BINARY_DIR}/generated/blns.hpp)
 
-# googletest
-#find_package(GTest REQUIRED)
-enable_testing()
-find_package(GTest REQUIRED)
 
-add_executable(unittest ${HDR_FILES} ${SRC_FILES} ${UT_FILES})
-target_link_libraries(unittest GTest::GTest GTest::Main)
-target_link_libraries(unittest Boost::boost Boost::system)
-target_link_libraries(unittest ${CMAKE_THREAD_LIBS_INIT})
-target_link_libraries(unittest OpenSSL::SSL OpenSSL::Crypto)
-target_link_libraries(unittest g3logger)
-add_dependencies(unittest packagestaticcpp)
+# Unit Tests
+if(${BUILD_UT})
+    # googletest
+    enable_testing()
+    find_package(GTest REQUIRED)
+
+    add_executable(unittest ${HDR_FILES} ${SRC_FILES} ${UT_FILES})
+    target_link_libraries(unittest GTest::GTest GTest::Main)
+    target_link_libraries(unittest Boost::boost Boost::system)
+    target_link_libraries(unittest ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(unittest OpenSSL::SSL OpenSSL::Crypto)
+    target_link_libraries(unittest g3logger)
+    add_dependencies(unittest packagestaticcpp)
+endif(${BUILD_UT})
 
 # web static assets
 add_subdirectory(static)
@@ -129,6 +152,7 @@
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
+# Visual Studio Code helper
 # this needs to be at the end to make sure all includes are handled correctly
 get_property(C_INCLUDE_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
 execute_process(COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/prime_vscode_compile_db.py ${C_INCLUDE_DIRS})
diff --git a/crow b/crow
index 4e39b23..4624b1b 160000
--- a/crow
+++ b/crow
@@ -1 +1 @@
-Subproject commit 4e39b23e455e455f1878b3e68d729a1737f3e431
+Subproject commit 4624b1b825b765b55317a26054b2eb460e42ebd3
diff --git a/scripts/build_web_assets.py b/scripts/build_web_assets.py
index 035a7da..bb6ded5 100755
--- a/scripts/build_web_assets.py
+++ b/scripts/build_web_assets.py
@@ -53,8 +53,13 @@
 
             pathsplit = full_filepath.split(os.path.sep)
             relative_path = os.path.sep.join(pathsplit[pathsplit.index("static") + 1:])
-            relative_path = "/" + relative_path
             
+            # handle the default routes
+            if relative_path.endswith("index.html"):
+                relative_path = ""
+            
+            relative_path = "/" + relative_path
+
             # make sure none of the files are hidden
             with open(full_filepath, 'rb') as input_file:
                 file_content = input_file.read()
diff --git a/src/token_authorization_middleware.cpp b/src/token_authorization_middleware.cpp
index abe002f..d1972fa 100644
--- a/src/token_authorization_middleware.cpp
+++ b/src/token_authorization_middleware.cpp
@@ -21,22 +21,24 @@
 
     void TokenAuthorizationMiddleware::before_handle(crow::request& req, response& res, context& ctx)
     {
-        return;
+        auto return_unauthorized = [&req, &res](){
+            res.code = 401;
+            res.end();
+        };
         if (req.url == "/login"){
+
+        }
+        // Check for an authorization header, reject if not present
+        if (req.headers.count("Authorization") != 1) {
+            return_unauthorized();
             return;
         }
 
-        // Check for an authorization header, reject if not present
-        if (req.headers.count("Authorization") != 1) {
-            res.code = 400;
-            res.end();
-            return;
-        }
         std::string auth_header = req.get_header_value("Authorization");
         // If the user is attempting any kind of auth other than token, reject
         if (!boost::starts_with(auth_header, "Token ")) {
-            res.code = 400;
-            res.end();
+            return_unauthorized();
+            return;
         }
     }
 
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 34f91d5..6c92e34 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -44,14 +44,8 @@
 
     std::string ssl_pem_file("server.pem");
     ensuressl::ensure_openssl_key_present_and_valid(ssl_pem_file);
-    //auto handler2 = std::make_shared<ExampleLogHandler>();
-    //crow::logger::setHandler(handler2.get());
-    crow::App<crow::TokenAuthorizationMiddleware> app;
 
-    CROW_ROUTE(app, "/")
-        .name("hello")([] {
-            return "Hello World!";
-        });   
+    crow::App<crow::TokenAuthorizationMiddleware> app; 
 
     crow::webassets::request_routes(app);
 
diff --git a/static/CMakeLists.txt b/static/CMakeLists.txt
index 58bfdbb..b7371d1 100644
--- a/static/CMakeLists.txt
+++ b/static/CMakeLists.txt
@@ -1,15 +1,3 @@
-set(HTML_ASSETS
-    hello.html
-    login.html
-    partial-eventlog.html
-    partial-fruinfo.html
-    partial-home-list.html
-    partial-kvm.html
-    partial-systeminfo.html
-    websocket.html
-)
-
-
 set(JAVASCRIPT_ASSETS
     js/selController.js
     js/lodash.core.js
@@ -19,6 +7,7 @@
     js/angular-ui-router.js
     js/restangular.js
     js/kvm-controller.js
+    js/logincontroller.js
     js/angular-resource.js
     js/angular-sanitize.js
     js/bmcApp.js
@@ -54,29 +43,65 @@
     css/font-awesome.css
     css/bootstrap-theme.css
     css/prettify.css
-    noVNC/tests/viewport.css
     noVNC/include/base.css
     noVNC/include/blue.css
     noVNC/include/black.css
 )
 
+set(HTML_ASSETS
+    index.html
+    login.html
+    partial-eventlog.html
+    partial-fruinfo.html
+    partial-home-list.html
+    partial-kvm.html
+    partial-systeminfo.html
+    websocket.html
+)
+
+set(IMG_ASSETS
+    img/logo.png
+)
+
 set(STATIC_ASSETS_OUT "")
 foreach(JAVASCRIPT_ASSET ${JAVASCRIPT_ASSETS})
-    set(OUTPUT_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET})
-    get_filename_component(FOLDERNAME ${OUTPUT_FILENAME} DIRECTORY)
-    file(MAKE_DIRECTORY "${FOLDERNAME}")
-    # TODO only minify if not a debug build
-    add_custom_command(OUTPUT ${OUTPUT_FILENAME} 
-        COMMAND closure-compiler --language_in=ECMASCRIPT5
-        --js  "${CMAKE_CURRENT_SOURCE_DIR}/${JAVASCRIPT_ASSET}"
-        --js_output_file "${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET}"
+    # if it's a debug build, don't minify
+    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+        list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_SOURCE_DIR}/${JAVASCRIPT_ASSET})
+    else()
+        set(OUTPUT_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET})
+        get_filename_component(FOLDERNAME ${OUTPUT_FILENAME} DIRECTORY)
+        file(MAKE_DIRECTORY "${FOLDERNAME}")
+        # TODO only minify if not a debug build
+        add_custom_command(OUTPUT ${OUTPUT_FILENAME} 
+            COMMAND closure-compiler --language_in=ECMASCRIPT5
+            --js  "${CMAKE_CURRENT_SOURCE_DIR}/${JAVASCRIPT_ASSET}"
+            --js_output_file "${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET}"
 
-        DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${JAVASCRIPT_ASSET}"
-        COMMENT "Minifying ${JAVASCRIPT_ASSET}"
-    )
-    list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET})
+            DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${JAVASCRIPT_ASSET}"
+            COMMENT "Minifying ${JAVASCRIPT_ASSET}"
+        )
+        list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_BINARY_DIR}/${JAVASCRIPT_ASSET})
+    endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
 endforeach(JAVASCRIPT_ASSET)
 
+# for now CSS is included as is
+foreach(CSS_ASSET ${CSS_ASSETS})
+    list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_SOURCE_DIR}/${CSS_ASSET})
+endforeach(CSS_ASSET)
+
+# for now HTML is included as is
+foreach(HTML_ASSET ${HTML_ASSETS})
+    list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_SOURCE_DIR}/${HTML_ASSET})
+endforeach(HTML_ASSET)
+
+# for now IMG is included as is
+foreach(IMG_ASSET ${IMG_ASSETS})
+    list(APPEND STATIC_ASSETS_OUT ${CMAKE_CURRENT_SOURCE_DIR}/${IMG_ASSET})
+endforeach(IMG_ASSET)
+
+message(STATIC_ASSETS_OUT ${CMAKE_CURRENT_BINARY_DIR}/${STATIC_ASSETS_OUT})
+
 add_custom_target(minifyjs ALL DEPENDS ${STATIC_ASSETS_OUT})
 
 set(CXX_STATIC_ASSETS_OUTPUT_FILE ${CMAKE_BINARY_DIR}/generated/webassets.cpp)
diff --git a/static/hello.html b/static/index.html
similarity index 95%
rename from static/hello.html
rename to static/index.html
index c536317..14b22df 100644
--- a/static/hello.html
+++ b/static/index.html
@@ -7,7 +7,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title>Integrated BMC Console</title>
 
-    <link href="css/bootstrap.min.css" rel="stylesheet">
+    <link href="css/bootstrap.css" rel="stylesheet">
     <link href="css/font-awesome.css" rel="stylesheet" >  
     <link href="css/intel.css" rel="stylesheet">
 
@@ -18,15 +18,16 @@
     <script src="js/angular-sanitize.js"></script>
     <script src="js/angular-cookies.js"></script>
     <script src="js/angular-resource.js"></script>
-    <script src="js/angular-ui-router.min.js"></script>
-    <script src="js/lodash.min.js"></script>
-    <script src="js/restangular.min.js"></script>
+    <script src="js/angular-ui-router.js"></script>
+    <script src="js/lodash.core.js"></script>
+    <script src="js/restangular.js"></script>
     <script src="js/ui-bootstrap-tpls-2.1.3.js"></script>
     <script src="js/bmcApp.js"></script>
     <script src="js/versionController.js"></script>
     <script src="js/selController.js"></script>
+    <script src="js/logincontroller.js"></script>
     <script src="js/kvm-controller.js"></script>
-    <script src="js/angular-websocket.min.js"></script>
+    <script src="js/angular-websocket.js"></script>
     <script src="js/kvm-controller.js"></script>
     <script src="noVNC/include/util.js"></script>
 
diff --git a/static/js/bmcApp.js b/static/js/bmcApp.js
index dfd4d4b..7392c47 100644
--- a/static/js/bmcApp.js
+++ b/static/js/bmcApp.js
@@ -130,42 +130,6 @@
 angular
     .module('Authentication')
 
-    .controller('LoginController', [
-      '$scope', '$rootScope', '$location', '$state', 'AuthenticationService',
-      function($scope, $rootScope, $location, $state, AuthenticationService) {
-        $scope.logoutreason = AuthenticationService.logoutreason;
-
-        $scope.login = function() {
-          $scope.dataLoading = true;
-          AuthenticationService.Login(
-              $scope.username, $scope.password,
-              function(response) {
-                AuthenticationService.SetCredentials(
-                    $scope.username, response.token);
-                if (typeof $state.after_login_state === "undefined") {
-                  $state.after_login_state = "systeminfo";
-                }
-                $state.go($state.after_login_state);
-                delete $state.after_login_state;
-
-              },
-              function(response) {
-                if (response.status === 401) {
-                  // reset login status
-                  AuthenticationService.ClearCredentials(
-                      "Username or Password is incorrect");
-                }
-                $scope.logoutreason = AuthenticationService.logoutreason;
-                $scope.error = response.message;
-                $scope.dataLoading = false;
-              });
-        };
-      }
-    ]);
-
-angular
-    .module('Authentication')
-
     .factory(
         'AuthenticationService',
         [
diff --git a/static/js/logincontroller.js b/static/js/logincontroller.js
new file mode 100644
index 0000000..d0b7a7f
--- /dev/null
+++ b/static/js/logincontroller.js
@@ -0,0 +1,32 @@
+angular.module('Authentication').controller('LoginController', [
+    '$scope', '$rootScope', '$location', '$state', 'AuthenticationService',
+    function($scope, $rootScope, $location, $state, AuthenticationService) {
+    $scope.logoutreason = AuthenticationService.logoutreason;
+
+    $scope.login = function() {
+        $scope.dataLoading = true;
+        AuthenticationService.Login(
+            $scope.username, $scope.password,
+            function(response) {
+            AuthenticationService.SetCredentials(
+                $scope.username, response.token);
+            if (typeof $state.after_login_state === "undefined") {
+                $state.after_login_state = "systeminfo";
+            }
+            $state.go($state.after_login_state);
+            delete $state.after_login_state;
+
+            },
+            function(response) {
+            if (response.status === 401) {
+                // reset login status
+                AuthenticationService.ClearCredentials(
+                    "Username or Password is incorrect");
+            }
+            $scope.logoutreason = AuthenticationService.logoutreason;
+            $scope.error = response.message;
+            $scope.dataLoading = false;
+            });
+    };
+    }
+]);
\ No newline at end of file
diff --git a/static/js/run_prettify.js b/static/js/run_prettify.js
index 1aab571..8204930 100644
--- a/static/js/run_prettify.js
+++ b/static/js/run_prettify.js
@@ -31,7 +31,7 @@
 (function(){function ba(g){function k(){try{M.doScroll("left")}catch(g){t.setTimeout(k,50);return}z("poll")}function z(k){if("readystatechange"!=k.type||"complete"==A.readyState)("load"==k.type?t:A)[B](p+k.type,z,!1),!q&&(q=!0)&&g.call(t,k.type||k)}var Y=A.addEventListener,q=!1,C=!0,x=Y?"addEventListener":"attachEvent",B=Y?"removeEventListener":"detachEvent",p=Y?"":"on";if("complete"==A.readyState)g.call(t,"lazy");else{if(A.createEventObject&&M.doScroll){try{C=!t.frameElement}catch(da){}C&&k()}A[x](p+
 "DOMContentLoaded",z,!1);A[x](p+"readystatechange",z,!1);t[x](p+"load",z,!1)}}function U(){V&&ba(function(){var g=N.length;ca(g?function(){for(var k=0;k<g;++k)(function(g){t.setTimeout(function(){t.exports[N[g]].apply(t,arguments)},0)})(k)}:void 0)})}for(var t=window,A=document,M=A.documentElement,O=A.head||A.getElementsByTagName("head")[0]||M,B="",F=A.getElementsByTagName("script"),q=F.length;0<=--q;){var P=F[q],Z=P.src.match(/^[^?#]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(Z){B=Z[1]||"";P.parentNode.removeChild(P);
 break}}var V=!0,H=[],Q=[],N=[];B.replace(/[?&]([^&=]+)=([^&]+)/g,function(g,k,z){z=decodeURIComponent(z);k=decodeURIComponent(k);"autorun"==k?V=!/^[0fn]/i.test(z):"lang"==k?H.push(z):"skin"==k?Q.push(z):"callback"==k&&N.push(z)});q=0;for(B=H.length;q<B;++q)(function(){var g=A.createElement("script");g.onload=g.onerror=g.onreadystatechange=function(){!g||g.readyState&&!/loaded|complete/.test(g.readyState)||(g.onerror=g.onload=g.onreadystatechange=null,--T,T||t.setTimeout(U,0),g.parentNode&&g.parentNode.removeChild(g),
-g=null)};g.type="text/javascript";g.src="../static/css/loader/lang-"+encodeURIComponent(H[q])+".js";O.insertBefore(g,O.firstChild)})(H[q]);for(var T=H.length,F=[],q=0,B=Q.length;q<B;++q)F.push("https://cdn.rawgit.com/google/code-prettify/master/loader/skins/"+encodeURIComponent(Q[q])+".css");F.push("../static/css/prettify.css");(function(g){function k(q){if(q!==z){var t=A.createElement("link");t.rel="stylesheet";t.type=
+g=null)};g.type="text/javascript";g.src="../css/loader/lang-"+encodeURIComponent(H[q])+".js";O.insertBefore(g,O.firstChild)})(H[q]);for(var T=H.length,F=[],q=0,B=Q.length;q<B;++q)F.push("https://cdn.rawgit.com/google/code-prettify/master/loader/skins/"+encodeURIComponent(Q[q])+".css");F.push("../css/prettify.css");(function(g){function k(q){if(q!==z){var t=A.createElement("link");t.rel="stylesheet";t.type=
 "text/css";q+1<z&&(t.error=t.onerror=function(){k(q+1)});t.href=g[q];O.appendChild(t)}}var z=g.length;k(0)})(F);var ca=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var g;(function(){function k(a){function d(e){var b=e.charCodeAt(0);if(92!==b)return b;var a=e.charAt(1);return(b=W[a])?b:"0"<=a&&"7">=a?parseInt(e.substring(1),8):"u"===a||"x"===a?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return"\\"===e||"-"===
 e||"]"===e||"^"===e?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[0-9A-Fa-f]{4}|\\x[0-9A-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\s\S]|-|[^-\\]/g);e=[];var a="^"===b[0],c=["["];a&&c.push("^");for(var a=a?1:0,h=b.length;a<h;++a){var l=b[a];if(/\\[bdsw]/i.test(l))c.push(l);else{var l=d(l),n;a+2<h&&"-"===b[a+1]?(n=d(b[a+2]),a+=2):n=l;e.push([l,n]);65>n||122<l||(65>n||90<l||e.push([Math.max(65,l)|32,Math.min(n,90)|32]),97>n||122<l||e.push([Math.max(97,l)&-33,Math.min(n,122)&-33]))}}e.sort(function(e,
 a){return e[0]-a[0]||a[1]-e[1]});b=[];h=[];for(a=0;a<e.length;++a)l=e[a],l[0]<=h[1]+1?h[1]=Math.max(h[1],l[1]):b.push(h=l);for(a=0;a<b.length;++a)l=b[a],c.push(f(l[0])),l[1]>l[0]&&(l[1]+1>l[0]&&c.push("-"),c.push(f(l[1])));c.push("]");return c.join("")}function g(e){for(var a=e.source.match(/(?:\[(?:[^\x5C\x5D]|\\[\s\S])*\]|\\u[A-Fa-f0-9]{4}|\\x[A-Fa-f0-9]{2}|\\[0-9]+|\\[^ux0-9]|\(\?[:!=]|[\(\)\^]|[^\x5B\x5C\(\)\^]+)/g),c=a.length,d=[],h=0,l=0;h<c;++h){var n=a[h];"("===n?++l:"\\"===n.charAt(0)&&(n=