added register view and its functionality