Added Register function and View.