Add support for player joining/movement

This also moves some of the logic code to the server, though most of it
still resides on the client.