registration

added functions to registration page.