Added and tested register new user functionality