Add register and login functionality.