code for register modal - does not work yet