# How to Customize the Login Page for MVC / Razor Page Applications When you create a new application using the [application startup template](https://docs.abp.io/en/abp/latest/Startup-Templates/Application), source code of the login page will not be inside your solution, so you can not directly change it. The login page comes from the [Account Module](https://docs.abp.io/en/abp/latest/Modules/Account) that is used a [NuGet package](https://www.nuget.org/packages/Volo.Abp.Account.Web) reference. This document explains how to customize the login page for your own application. ## Create a Login PageModel Create a new class inheriting from the [LoginModel](https://github.com/abpframework/abp/blob/037ef9abe024c03c1f89ab6c933710bcfe3f5c93/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs) of the Account module. ````csharp public class CustomLoginModel : LoginModel { public CustomLoginModel( Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemeProvider, Microsoft.Extensions.Options.IOptions accountOptions) : base(schemeProvider, accountOptions) { } } ```` > Naming convention is important here. If your class name doesn't end with `LoginModel`, you need to manually replace the `LoginModel` using the [dependency injection](https://docs.abp.io/en/abp/latest/Dependency-Injection) system. Then you can override any method you need and add new methods and properties needed by the UI. ## Overriding the Login Page UI Create folder named **Account** under **Pages** directory and create a **Login.cshtml** under this folder. It will automatically override the `Login.cshtml` file defined in the Account Module. A good way to customize a page is to copy its source code. [Click here](https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml) for the source code of the login page. At the time this document has been written, the source code was like below: ````xml @page @using Volo.Abp.Account.Settings @using Volo.Abp.Settings @model Acme.BookStore.Web.Pages.Account.CustomLoginModel @inject Volo.Abp.Settings.ISettingProvider SettingProvider @if (Model.EnableLocalLogin) {

@L["Login"]

@if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) { @L["AreYouANewUser"] @L["Register"] }
@L["Login"]
} @if (Model.VisibleExternalProviders.Any()) {

@L["UseAnotherServiceToLogIn"]

@foreach (var provider in Model.VisibleExternalProviders) { }
} @if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any()) {
@L["InvalidLoginRequest"] @L["ThereAreNoLoginSchemesConfiguredForThisClient"]
} ```` Just changed the `@model` to `Acme.BookStore.Web.Pages.Account.CustomLoginModel` to use the customized `PageModel` class. You can change it however your application needs. ## The Source Code You can find the source code of the completed example [here](https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization).