I say buy new and spend as much as possible, at least $1000 for a better quality bike. 400 will get you a bike to ride but if you actually RIDE it, you're going to wear out the low end hubs and components. Then you'll end up wasting money replacing the cheap stuff.
And buy new but make sure you get a lifetime warranty and free tune up service for the first few months or year.
If you buy used, you're stuck with what you get and I know not all sellers are honest. I've had friends get jacked by people who claimed to be selling good bikes.