Fix redirecting to a user profile after a user registers
Fix minor test failures