# Login as First Page

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.

1. Update Route start: ***full-version\src\routes\index.js***

```javascript
import { useRoutes } from 'react-router-dom';

// routes
import MainRoutes from './MainRoutes';
import LoginRoutes from './LoginRoutes';
import AuthenticationRoutes from './AuthenticationRoutes';

// ==============================|| ROUTING RENDER ||============================== //

export default function ThemeRoutes() {
    // return useRoutes([{ path: '/', element: <PagesLanding /> }, AuthenticationRoutes, LoginRoutes, MainRoutes]);
    return useRoutes([LoginRoutes, AuthenticationRoutes, MainRoutes]);
}

```

2. Add default Login route: ***full-version\src\routes\LoginRoutes.js***

```javascript
import { lazy } from 'react';

// project imports
import GuestGuard from 'utils/route-guard/GuestGuard';
import MinimalLayout from 'layout/MinimalLayout';
import NavMotion from 'layout/NavMotion';
import Loadable from 'ui-component/Loadable';

// login routing
const AuthLogin = Loadable(lazy(() => import('views/pages/authentication/authentication3/Login3')));
const AuthRegister = Loadable(lazy(() => import('views/pages/authentication/authentication3/Register3')));
const AuthForgotPassword = Loadable(lazy(() => import('views/pages/authentication/authentication3/ForgotPassword3')));

// ==============================|| AUTH ROUTING ||============================== //

const LoginRoutes = {
    path: '/',
    element: (
        <NavMotion>
            <GuestGuard>
                <MinimalLayout />
            </GuestGuard>
        </NavMotion>
    ),
    children: [
        {
            path: '/',
            element: <AuthLogin />
        },
        {
            path: '/login',
            element: <AuthLogin />
        },
        {
            path: '/register',
            element: <AuthRegister />
        },
        {
            path: '/forgot',
            element: <AuthForgotPassword />
        }
    ]
};

export default LoginRoutes;
```

## For Remix

Remix has file based routing structure. when path is **`/login`**  then navigate to login page behalf on AuthGuard.

***full-version\app\layout\index.tsx***

```typescript
// project import
import LAYOUT from 'constant';
import AuthGuard from 'utils/route-guard/AuthGuard';
import GuestGuard from 'utils/route-guard/GuestGuard';
import MainLayout from './MainLayout';
import MinimalLayout from './MinimalLayout';

// types
import type { Props } from 'constant';

// ==============================|| LAYOUTS - STRUCTURE ||============================== //

export default function Layout({ variant = LAYOUT.main, children }: Props) {
    switch (variant) {
        case LAYOUT.minimal:
            return <MinimalLayout>{children}</MinimalLayout>;

        case LAYOUT.noauth:
            return (
                <GuestGuard>
                    <MinimalLayout>{children}</MinimalLayout>
                </GuestGuard>
            );

        default:
            return (
                <AuthGuard>
                    <MainLayout>{children}</MainLayout>
                </AuthGuard>
            );
    }
}
```

We can set **`<layout>`** in ***full-version\app\routes\login\index.tsx***&#x20;

<pre class="language-typescript" data-title="login/index.tsx"><code class="lang-typescript"><strong>...
</strong><strong>
</strong><strong>// project imports
</strong>import Layout from 'layout';
import LAYOUT from 'constant';
import AuthWrapper1 from 'components/authentication/AuthWrapper1';

...

// ================================|| AUTH3 - LOGIN ||================================ //

const Login = () => {
    ...
    return (
        &#x3C;Layout variant={LAYOUT.noauth}>
            &#x3C;AuthWrapper1>
                ...
            &#x3C;/AuthWrapper1>
        &#x3C;/Layout>
    );
};

export default Login;
</code></pre>
