Added validation in registration form (server and client side)