Customise the Login form

Silverstripe Version:

Question:

Hi,
I’m a new user of SilverStripe. Currently, I’m using SilverStripe 4.5 to develop my website and would like to customise the Login form. I override the Security.ss in my themes folder. But I cannot get validation results, such as MessageType, Message. Could anyone know how to solve this? Part of my code showed as below:

<form id="MemberLoginForm_LoginForm" action="/Security/login/default/LoginForm/" method="post" enctype="application/x-www-form-urlencoded">    
    <% if $Message %>
        <p id="MemberLoginForm_LoginForm_error" class="message $MessageType">$Message</p>    
    <% end_if %>
     ...... other elements                 
</form>