Refactored Register.java servlet. DONE