Writing a trigger for every time a user logs in
I would suggest using basic auditing.  Parameter audit_trail can be set to DB, and you can audit system privileges, including CREATE SESSION.  Auditing CREATE SESSION captures (among others), database and O/S user IDs.  Views of interest are sys.aud$ and dba_audit_session.  You may not need to add a logon trigger if the information you want is already captured through auditing.  L Sallwasser