Dynamics of scalar and vector boson stars