Converted the code for the client side signup file from CoffeeScript to JS