A login script can be specified to be invoked on login through a login profile. If a global login trigger is specified through sp_logintrigger, the login script is invoked after the global login trigger.
create login profile with login script 'empNew.script'
A login script can be qualified by specifying the database where it resides and the owner name. When not qualified with a database name, the default database takes precedence over the master database.
If the specified login script is not qualified with an owner name, the owner of the login trigger, which is the current login, takes precedence over the database owner where the login trigger resides.
Stored procedures used as a login script through create login, alter login, create login profile, and alter login profile, is restricted to 120 characters.
For more information see, “Using login triggers”.