Login and Register Validations and functionality