Fix logout

COOKIE and DB entry get deleted. Also session invalidated.