Some bugs fixed in registrationServlet