Added function to register account