fix #415. Include the database when sending an auth error