Add check for remote_user variable for trusted proxy auth

If trusted proxy authentication is on, yet the proxy did not authenticate the user, then the default authentication method is used instead of returning 'Unauthorized'.