Add tests for login_required