debugging authentication errors