Redirect to error404 when user not found.

Closes #3459.