```
button:
```
```
and
```
```
to go with the button:
```
```
Using Dom7 we capture the click event on the sign in button:
```
$$("#signUpButton").on("click", () => {
var formData = app.form.convertToData('#signUpForm');
//alert("clicked Sign Up: " + JSON.stringify(formData));
firebase.auth().createUserWithEmailAndPassword(formData.username, formData.password).then(
() => {
// could save extra info in a profile here I think.
app.loginScreen.close(".signupYes", true);
}
).catch((error) => {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
$$("#signUpError").html(errorCode + " error " + errorMessage)
console.log(errorCode + " error " + errorMessage);
// ...
});
});
```
There is also a database.rules.json file that you can plug in to your firebase console. In your firebase console you will also need to set up the email and password provider.