Refactor user update and authentication tests.