Fix #320 by checking credentials before processing the notification.