Add login for tests that need login.

Add login code for test_create_view, test_create_redirect and test_create_answer.