Added user register and login functionality.