Added logic of registration and email verification