Clean up js file for main.js, add comments

Adding comments for signup.php