Check if user exists prior to fetching group info

This change prevents flooding the http server log with "user doesn't exist"
messages.