repair tests and remove old references to session[:cookie]