Implemented Authentication and Registration.