Rework logged on user id retrieval for SQL data access.