Modify the test_redirect method to work with user