Buying unlocked HTC One and switching to T-Mobile

I'm pretty much set on getting HTC One on T-Mobile, and I see it's now available to preorder directly from HTC: http://www1.htconeprereg.com/brands/HTCPreReg/homebrands/index.htm

What's interesting is that the unlocked version of the phone is available to preorder for $575. What I'm thinking is I could buy it unlocked and then join T-Mobile and port over (I'm on AT&T right now), as it seems you can 'bring your own phone' to T-Mobile. Apparently T-Mobile will offer the One for $580, but I'd be able to spread those payments out if necessary ($99.99 + $20x24).

Does this logic make sense? The unlocked phone is compatible with T-Mob, right? It also comes with a free case, which I'd actually make use of, though I do want it in black so I might be waiting...

Thanks for your input!