• I changed the trigger but got the same login error when I tried to log in and the SQL Server error log also has the same error.

    but I found out one thing.

    if I create the table in master database and then create the trigger. it works fine. I am able to log into the user database and I believe other user's will also be able to log in

    but when I run a select on the Audit table, the DB_NAME column only shows master and not the user database.