> For the complete documentation index, see [llms.txt](https://codedthemes.gitbook.io/mantis-vuetify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codedthemes.gitbook.io/mantis-vuetify/how-to/login-as-first-page.md).

# Login as First Page

How to set login as First page instead landing

This section explains how to set the login page as the default starting page, skipping the landing page for cases where it is not needed.

Update route at: ***full-version\src\router\index.ts*** & commented code of landing routes setup.

```typescript
import { createRouter, createWebHistory } from 'vue-router';
.....

// Manually register the landing page as a standalone route outside the (main) FullLayout group.
// any index.vue at the root level would become a child rendered inside FullLayout.
// const landingRoute = {
//   path: '/',
//   name: 'landing',
//   component: () => import('@/pages/index.vue'),
//   meta: { requiresAuth: false }
// };

.....

export const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // routes: [landingRoute, ...routes, notFoundRoute],
  routes: [...routes, notFoundRoute],
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { top: 0 };
    }
  }
});

......

```

Add default Login route: ***full-version\src\router\index.ts***

```typescript
import { createRouter, createWebHistory } from 'vue-router';
.....

// set default first page login in place of landing
const loginRoute = {
   path: '/',
   name: 'login',
   component: () => import('@/pages/login.vue'),
   meta: { requiresAuth: false }
};

.....

export const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // routes: [...routes, notFoundRoute],
  routes: [loginRoute, ...routes, notFoundRoute],  // updated here also
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { top: 0 };
    }
  }
});

......

```
