Updated Code with Login and Registration Services Integrated.