Logs a user query