Modify signup JavaScript to improve functionality.