added check invitation or user in registration process