Logging after all checks are complete ensures the session ID is correct when logging it in the user_logs table Co-authored-by: Tim Fry <tim@fusionpbx.com>