Basic idea of the test is clear. Two definite improvements needed: populate a test database and check whether the page after click matches the logged_in template, or the corresponding view, however that's done.