added saving new user to db functionality.