Update main.cpp

Member functions for Registering