Critical point theory for vector valued functions