Fix undefined var in register function

	modified:   js/api.js
Register and login form validation

	modified:   js/main.js