Use sp_logintrigger to set a global login trigger that is executed at each user login. To take user-specific actions, use alter login or create login to set a user-specific login trigger.
See the Reference Manual: Commnands.