Add functionality to register new accounts and validate inputs