Added validator for xss security, username creation is done and server code moved to server.js