added behavior that automatically logs the user in after registration