Add Register.java and update Server.java