Move bitcoins from one address to another using JSON RPC
The leftover 0.5 BTC is sent to a change address because it is not good practice to reuse addresses.  You would simply have to assign the change addresses to the users.