completed the registration and login functionality