add register and password functionality