If you need an alert or confirm box every time a user logs into the ServiceNow CMS, you have come to the right place. Below, I will talk about the steps that i took to display a confirm message as shown here:

After a person logs in, the confirm message displays. If the user selects “ok”, it proceeds to the homepage. However, if they select cancels it would redirect the user to the login page. Do note that all the steps are done in the global scope.
Step 1:
Navigate to System UI > Messages
Step 2:
Create a new message as shown:

Step 3:
Create a UI Page(Left processing script empty) :

Step 4:
Navigate to Content Management > Pages and create a new page as follows:

Keep in mind that the URL suffix needs to be “/” + the UI page name
Step 5: Navigate to Content Management > Configuration > Login Rules
Step 6: on the list view change Execution order of the login rule called “Direct Navigation” to anything thats more than 0:

Step 7: Create New Login Rule – On the redirect to field select “Content Page”, and select the CMS page that you’ve created on the content page field:

and there you have it! A confirm message on log in.