Add login and logout functionality

- Add AuthenticationStore
- Add ability to login and logout
- Add route navigation guard
- Add login styles
- Add temporary authentication for api call
- Add Login directory
- Add index.js

In order to login a .env.development.local file that contains
BASE_URL="https://<ip address> or <FQDN>"

Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I88b93e287e66f4bae82a1ec2934cdef12d78264e
diff --git a/src/router/index.js b/src/router/index.js
index 11d1a47..698aa70 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,28 +1,35 @@
 import Vue from "vue";
 import VueRouter from "vue-router";
+import store from "../store/index";
+import AppLayout from "../layouts/AppLayout.vue";
 
 Vue.use(VueRouter);
 
 const routes = [
   {
     path: "/",
-    name: "overview",
-    component: () => import("@/views/Overview")
+    name: "",
+    meta: {
+      requiresAuth: true
+    },
+    component: AppLayout,
+    children: [
+      {
+        path: "",
+        component: () => import("@/views/Overview")
+      },
+      {
+        path: "/access-control/local-user-management",
+        name: "local-users",
+        component: () => import("@/views/AccessControl/LocalUserManagement")
+      }
+    ]
   },
   {
-    path: "/access-control/local-user-management",
-    name: "local-users",
-    component: () => import("@/views/AccessControl/LocalUserManagement")
+    path: "/login",
+    name: "login",
+    component: () => import("@/views/Login")
   }
-  // {
-  //   path: "/about",
-  //   name: "about",
-  //   // route level code-splitting
-  //   // this generates a separate chunk (about.[hash].js) for this route
-  //   // which is lazy-loaded when the route is visited.
-  //   component: () =>
-  //     import(/* webpackChunkName: "about" */ "../views/About.vue")
-  // }
 ];
 
 const router = new VueRouter({
@@ -32,4 +39,16 @@
   linkExactActiveClass: "nav__link--current"
 });
 
+router.beforeEach((to, from, next) => {
+  if (to.matched.some(record => record.meta.requiresAuth)) {
+    if (store.getters["authentication/isLoggedIn"]) {
+      next();
+      return;
+    }
+    next("/login");
+  } else {
+    next();
+  }
+});
+
 export default router;