Refactored conditional for correctness in the log
Conditional checking for direct access checked for incorrect type of event
Added test case for direct access user