Fixed NameError

@stephendonner this should fix failure in tests.test_homepage.TestHomepage.test_that_user_can_login_and_logout.