Refactoring of Register Servlet