create register functionality on clientside