Improved unit test for register user to detect if not authenticated after registration